gstplugin: Add C++ escape for gst_plugin_desc define
authorDavid Schleef <ds@schleef.org>
Mon, 9 Nov 2009 18:52:42 +0000 (10:52 -0800)
committerDavid Schleef <ds@schleef.org>
Thu, 19 Nov 2009 17:04:56 +0000 (18:04 +0100)
In order to properly export the gst_plugin_desc symbol
from DLLs in MSVC, it needs to be extern "C".

gst/gstplugin.h

index 4cc3801..12a37b2 100644 (file)
@@ -227,6 +227,7 @@ struct _GstPluginClass {
  * The macro uses a define named PACKAGE for the #GstPluginDesc,source field.
  */
 #define GST_PLUGIN_DEFINE(major,minor,name,description,init,version,license,package,origin)    \
+G_BEGIN_DECLS \
 GST_PLUGIN_EXPORT GstPluginDesc gst_plugin_desc = {    \
   major,                                               \
   minor,                                               \
@@ -239,7 +240,8 @@ GST_PLUGIN_EXPORT GstPluginDesc gst_plugin_desc = { \
   package,                                             \
   origin,                                              \
   GST_PADDING_INIT                                     \
-};
+}; \
+G_END_DECLS
 
 /**
  * GST_PLUGIN_DEFINE_STATIC: