=== Released 2.2.0 ===
[platform/upstream/glib.git] / gobject / gparamspecs.h
index 0b7584f..6d354b7 100644 (file)
  *
  * gparamspecs.h: GLib default param specs
  */
-#ifndef __G_PARAMSPECS_H__
-#define __G_PARAMSPECS_H__
-
 #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
 #error "Only <glib-object.h> can be included directly."
 #endif
 
+#ifndef __G_PARAMSPECS_H__
+#define __G_PARAMSPECS_H__
+
 #include        <gobject/gvalue.h>
 #include        <gobject/genums.h>
 #include        <gobject/gboxed.h>
@@ -384,7 +384,30 @@ GParamSpec*        g_param_spec_object      (const gchar    *name,
 
 
 /* --- internal --- */
-GLIB_VAR GType *g_param_spec_types;
+/* We prefix variable declarations so they can
+ * properly get exported in windows dlls.
+ */
+#ifndef GOBJECT_VAR
+#  ifdef G_PLATFORM_WIN32
+#    ifdef GOBJECT_STATIC_COMPILATION
+#      define GOBJECT_VAR extern
+#    else /* !GOBJECT_STATIC_COMPILATION */
+#      ifdef GOBJECT_COMPILATION
+#        ifdef DLL_EXPORT
+#          define GOBJECT_VAR __declspec(dllexport)
+#        else /* !DLL_EXPORT */
+#          define GOBJECT_VAR extern
+#        endif /* !DLL_EXPORT */
+#      else /* !GOBJECT_COMPILATION */
+#        define GOBJECT_VAR extern __declspec(dllimport)
+#      endif /* !GOBJECT_COMPILATION */
+#    endif /* !GOBJECT_STATIC_COMPILATION */
+#  else /* !G_PLATFORM_WIN32 */
+#    define GOBJECT_VAR extern
+#  endif /* !G_PLATFORM_WIN32 */
+#endif /* GOBJECT_VAR */
+
+GOBJECT_VAR GType *g_param_spec_types;
 
 G_END_DECLS