[libsoup] Makefile.glib: support marking get_type as extern
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] Makefile.glib: support marking get_type as extern
- Date: Wed, 4 Nov 2015 18:55:03 +0000 (UTC)
commit 35acf971258358bea5c5d8647fe0ef756d473b99
Author: Paolo Borelli <pborelli gnome org>
Date: Tue Nov 3 11:45:26 2015 +0100
Makefile.glib: support marking get_type as extern
Add GLIB_MKENUMS_EXTERN to the template, so that a program can
redefine it to ensure the function is exported in MSVC builds
https://bugzilla.gnome.org/show_bug.cgi?id=757146
Makefile.glib | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.glib b/Makefile.glib
index 9e06353..97e94b0 100644
--- a/Makefile.glib
+++ b/Makefile.glib
@@ -206,7 +206,8 @@ $(1).h.stamp: $(_glib_enum_types_h_sources) Makefile
$$(GLIB_MKENUMS_H_FLAGS) \
$$($(_glib_enum_types_prefix)_MKENUMS_H_FLAGS) \
--fhead "#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
- --vhead "GType @enum_name _get_type (void) G_GNUC_CONST;\n#define @ENUMPREFIX
_TYPE_@ENUMSHORT@ (@enum_name _get_type ())\n" \
+ --fhead "#ifndef GLIB_MKENUMS_EXTERN\n#define GLIB_MKENUMS_EXTERN\n#endif\n" \
+ --vhead "GLIB_MKENUMS_EXTERN GType @enum_name _get_type (void) G_GNUC_CONST;\n#define
@ENUMPREFIX _TYPE_@ENUMSHORT@ (@enum_name _get_type ())\n" \
--ftail "G_END_DECLS\n\n#endif /* $(_glib_enum_types_guard) */" \
$$(filter-out Makefile, $$^) > $(1).h.tmp && \
(cmp -s $(1).h.tmp $(1).h || cp $(1).h.tmp $(1).h) && \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]