[Bug 754464] New: Add support for g_autoptr() and friends
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Wed Sep 2 07:50:12 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=754464
Bug ID: 754464
Summary: Add support for g_autoptr() and friends
Classification: Platform
Product: GStreamer
Version: unspecified
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gstreamer (core)
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: xclaesse at gmail.com
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
It would be nice if all GStreamer libraries (those who install header files)
define the autoptr function for all their typedefs, using one of those macro:
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC
G_DEFINE_AUTO_CLEANUP_FREE_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC
That would allow:
- Use of G_DECLARE_* in GStreamer itself and in applications using it when
subclassing a gst type.
- Use of g_autoptr() in applications that don't care about other compilers
than gcc/clang. Notably GStreamer itself shouldn't use it to keep compat with
MSVC.
Note that it doesn't mean that GStreamer itself would depend on gcc/clang since
those macro does nothing when not supported by the compiler.
Those macros are new in glib 2.44, and GStreamer isn't probably going to depend
on it any time soon (is it?). But applications using gst often can depend on
newer glib, so it would make sense to add a gst-autocleanups.h file like the
one in gobject/gio/gtk but starting with a #ifdef
G_DEFINE_AUTOPTR_CLEANUP_FUNC.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list