[gstreamer-bugs] [Bug 572480] New: unref and copy functions should not be macros

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Thu Feb 19 11:53:04 PST 2009


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=572480

  GStreamer | gstreamer (core) | Ver: git
           Summary: unref and copy functions should not be macros
           Product: GStreamer
           Version: git
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: ali.sabil at gmail.com
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


unref and copy functions are sometimes used as function pointers for example in
the case of g_hash_table_new_full as a GDestroyNotify function.

Currently GstBuffer, GstEvent, GstMessage and GstQuery define their respective
unref and copy functions as macros, making use of gst_mini_object_unref/copy.
This approach works very well for most cases, except for some automatically
generated bindings (currently Vala), where the memory management semantics are
defined declaratively.

The possible solutions would be to either convert all the macros into static
inline function, or change the signature of gst_mini_object_unref to take a
void* instead of a GstMiniObject*


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=572480.




More information about the Gstreamer-bugs mailing list