All pastes #1663804 Raw Edit

Miscellany

public text v1 · immutable
#1663804 ·published 2009-11-09 19:27 UTC
rendered paste body
From aeb69853c0e869183898142534b71e5233bf66f7 Mon Sep 17 00:00:00 2001
From: David Schleef <ds@schleef.org>
Date: Mon, 9 Nov 2009 10:52:42 -0800
Subject: [PATCH] gstplugin: Add C++ escape for gst_plugin_desc define

In order to properly export the gst_plugin_desc symbol
from DLLs in MSVC, it needs to be extern "C".
---
 gst/gstplugin.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/gst/gstplugin.h b/gst/gstplugin.h
index 4cc3801..12a37b2 100644
--- a/gst/gstplugin.h
+++ b/gst/gstplugin.h
@@ -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:
-- 
1.6.0.4