Skip to content

Functions using GDestroyNotify only don't get wrapped

I see there's support for cases where GDestroyNotify just disappears:

// guint g_child_watch_add_full (gint priority, GPid pid, GChildWatchFunc function /*none*/, gpointer data, GDestroyNotify notify /*none,nullable*/);
// guint g_child_watch_add_full (gint priority, ::GPid pid, GLib::ChildWatchFunc::cfunction_type function /*none*/, void* data, GLib::DestroyNotify::cfunction_type notify /*none,nullable*/);
GI_INLINE_DECL guint child_watch_add (gint priority, ::GPid pid, GLib::ChildWatchFunc function) noexcept;

But there's no support for cases where GDestroyNotify is the only callback:

// GVariant* /*none*/ g_variant_new_from_data (const GVariantType* type /*none*/, gconstpointer data /*none*/, gsize size, gboolean trusted, GDestroyNotify notify /*none*/, gpointer user_data);
// ::GVariant* /*none*/ g_variant_new_from_data (const ::GVariantType* type /*none*/, const guint8* data /*none*/, gsize size, gboolean trusted, GLib::DestroyNotify::cfunction_type notify /*none*/, void* user_data);
// SKIP; callback misses closure info
// GBytes* /*full*/ g_bytes_new_with_free_func (gconstpointer data /*none,nullable*/, gsize size, GDestroyNotify free_func /*none*/, gpointer user_data);
// ::GBytes* /*full*/ g_bytes_new_with_free_func (const guint8* data /*none,nullable*/, gsize size, GLib::DestroyNotify::cfunction_type free_func /*none*/, void* user_data);
// IGNORE; not introspectable, callback misses closure info

These functions quite important as they allow to create GVariant/GBytes without unneeded memory copying.

Edited by Ilya Fedin