Include gtypes.h not gobject/gtype.h
[platform/upstream/glib.git] / gobject / gclosure.h
index d188d05..aa60540 100644 (file)
@@ -19,6 +19,9 @@
 #ifndef __G_CLOSURE_H__
 #define __G_CLOSURE_H__
 
+#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
+#error "Only <glib-object.h> can be included directly."
+#endif
 
 #include        <gobject/gtype.h>