summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2017-11-28 17:55:42 +0800
committerTomas Popela <tpopela@redhat.com>2018-04-11 12:39:19 +0200
commit89f8d814d90030864989816d56233bed300d8b57 (patch)
tree5216e31be33dd107369584b3f56b5ba65ea7dc52
parentcecb5de96bcd0364b23591bb850c89c19cc870fe (diff)
downloadlibsoup-89f8d814d90030864989816d56233bed300d8b57.tar.gz
soup-enum-types: Make sure items are exported properly
We need to decorate the symbols in the soup-enum-types.h.template with GLIB_MKENUMS_EXTERN, and ensure that config.h is included in soup-enum-types.c.template, so that the symbols in the generated enumeration sources are exported from Visual Studio builds. This will allow introspection builds to complete successfully on Visual Studio.
-rw-r--r--libsoup/soup-enum-types.c.template2
-rw-r--r--libsoup/soup-enum-types.h.template2
2 files changed, 3 insertions, 1 deletions
diff --git a/libsoup/soup-enum-types.c.template b/libsoup/soup-enum-types.c.template
index 6107dc05..8afb533e 100644
--- a/libsoup/soup-enum-types.c.template
+++ b/libsoup/soup-enum-types.c.template
@@ -1,4 +1,6 @@
/*** BEGIN file-header ***/
+#include <config.h>
+
#define LIBSOUP_USE_UNSTABLE_REQUEST_API
#include <libsoup/soup.h>
diff --git a/libsoup/soup-enum-types.h.template b/libsoup/soup-enum-types.h.template
index e23a8670..1893283e 100644
--- a/libsoup/soup-enum-types.h.template
+++ b/libsoup/soup-enum-types.h.template
@@ -15,7 +15,7 @@ G_BEGIN_DECLS
/*** END file-production ***/
/*** BEGIN value-header ***/
-GType @enum_name@_get_type (void);
+GLIB_MKENUMS_EXTERN GType @enum_name@_get_type (void);
#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())
/*** END value-header ***/