gstinfo: API: Add GST_DEBUG_REGISTER_FUNCPTR method.
authorEdward Hervey <bilboed@bilboed.com>
Tue, 1 Dec 2009 16:53:03 +0000 (17:53 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Tue, 1 Dec 2009 16:56:19 +0000 (17:56 +0100)
This is a variant of GST_DEBUG_FUNCPTR which does not return anything.

docs/gst/gstreamer-sections.txt
gst/gstinfo.h

index ca7dc79..019ff8c 100644 (file)
@@ -1017,6 +1017,7 @@ GST_DEBUG
 GST_LOG
 GST_FIXME
 GST_MEMDUMP
+GST_DEBUG_REGISTER_FUNCPTR
 GST_DEBUG_FUNCPTR
 GST_DEBUG_FUNCPTR_NAME
 GST_DEBUG_BIN_TO_DOT_FILE
index 7a34f69..6266014 100644 (file)
@@ -1101,11 +1101,26 @@ G_CONST_RETURN gchar *
        _gst_debug_nameof_funcptr       (GstDebugFuncPtr        func);
 
 /**
+ * GST_DEBUG_REGISTER_FUNCPTR:
+ * @ptr: pointer to the function to register
+ *
+ * Register a pointer to a function with its name, so it can later be used by
+ * GST_DEBUG_FUNCPTR_NAME().
+ *
+ * Use this variant of #GST_DEBUG_FUNCPTR if you do not need to use @ptr.
+ *
+ * Since: 0.10.26
+ */
+#define GST_DEBUG_REGISTER_FUNCPTR(ptr) \
+  _gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr)
+/**
  * GST_DEBUG_FUNCPTR:
  * @ptr: pointer to the function to register
  *
  * Register a pointer to a function with its name, so it can later be used by
  * GST_DEBUG_FUNCPTR_NAME().
+ *
+ * Returns: the value passed to @ptr.
  */
 #define GST_DEBUG_FUNCPTR(ptr) \
   (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
@@ -1379,6 +1394,7 @@ GST_FIXME (const char *format, ...)
 #endif /* G_HAVE_GNUC_VARARGS */
 #endif /* G_HAVE_ISO_VARARGS */
 
+#define GST_DEBUG_REGISTER_FUNCPTR(ptr) G_STMT_START{ }G_STMT_END
 #define GST_DEBUG_FUNCPTR(ptr) (ptr)
 #define GST_DEBUG_FUNCPTR_NAME(ptr) (g_strdup_printf ("%p", ptr))