Add a new _GLIB_EXTERN macro for "extern"
authorRyan Lortie <desrt@desrt.ca>
Thu, 6 Dec 2012 18:37:45 +0000 (13:37 -0500)
committerRyan Lortie <desrt@desrt.ca>
Sun, 13 Jan 2013 18:13:36 +0000 (13:13 -0500)
commitb91c47682749b7e1455305ec5f99d5f950574a36
tree3c381ab0e8ec687c70912b17ef85ba9a26864e77
parentba1bdd0708b154396c0e0d0609353db21ab5e6e9
Add a new _GLIB_EXTERN macro for "extern"

This macro simply evaluates the "extern" unless it has been explicitly
defined to something else.

All of the version macros (including the unversioned deprecation markers
and GLIB_AVAILABLE_IN_ALL) now include _GLIB_EXTERN as part of their
definition.

G_INLINE has also been modified to use _GLIB_EXTERN where appropriate.

This macro should never be used outside of the gmacros.h/gversonmacros.h
headers.

The effect of this patch is that "extern" has now been added to all
functions declared in installed headers.  Strictly speaking, this is
something we should have had all along...

GLIB_VAR and GOBJECT_VAR have also been modified to use _GLIB_EXTERN on
non-Windows, instead of "extern" which they were using before.  The
eventual goal is to use the normal version/deprecation macros on
exported variables and drop GLIB_VAR but we need to see how this will
work on Windows before we go ahead with that.

https://bugzilla.gnome.org/show_bug.cgi?id=688681
glib/gmacros.h
glib/gtypes.h
glib/gutils.h
glib/gversionmacros.h
gobject/gparamspecs.h