summaryrefslogtreecommitdiffstats
path: root/gobject/pygobject-private.h
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2008-07-26 14:46:58 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-07-26 14:46:58 +0000
commitd2f53eb32409ea9dbf654febc7853badc81a8e4b (patch)
tree4c6677c57a4fa99ac67a7000c65bed2cc826b0a1 /gobject/pygobject-private.h
parent130e20efbdc32e7b49960f24fac59c04fb613f87 (diff)
downloadpygobject-d2f53eb32409ea9dbf654febc7853badc81a8e4b.tar.gz
pygobject-d2f53eb32409ea9dbf654febc7853badc81a8e4b.tar.xz
pygobject-d2f53eb32409ea9dbf654febc7853badc81a8e4b.zip
reviewed by: <delete if not using a buddy>
2008-07-26 Johan Dahlin <johan@gnome.org> reviewed by: <delete if not using a buddy> * glib/pyglib-python-compat.h: * glib/pyglib.h: Make a few macros public * gobject/Makefile.am: * gobject/gobjectmodule.c (init_gobject): * gobject/pyginterface.c (pyg_interface_init), (pyg_interface_free), (pyg_register_interface), (pyg_register_interface_info), (pyg_lookup_interface_info), (pygobject_interface_register_types): * gobject/pyginterface.h: * gobject/pygobject-private.h: * gobject/pygobject.c: Move GInterface wrapper into its own file svn path=/trunk/; revision=875
Diffstat (limited to 'gobject/pygobject-private.h')
-rw-r--r--gobject/pygobject-private.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/gobject/pygobject-private.h b/gobject/pygobject-private.h
index 34a7e97..0db5550 100644
--- a/gobject/pygobject-private.h
+++ b/gobject/pygobject-private.h
@@ -27,6 +27,14 @@ typedef int Py_ssize_t;
typedef inquiry lenfunc;
#endif
+#define PYGOBJECT_REGISTER_GTYPE(d, type, name, gtype) \
+ { \
+ PyObject *o; \
+ PYGLIB_REGISTER_TYPE(d, type, name); \
+ PyDict_SetItemString(type.tp_dict, "__gtype__", \
+ o=pyg_type_wrapper_new(gtype)); \
+ Py_DECREF(o); \
+}
/* from gobjectmodule.c */
extern struct _PyGObject_Functions pygobject_api_functions;
@@ -141,7 +149,6 @@ extern PyTypeObject *PyGObject_MetaType;
/* from pygobject.h */
extern PyTypeObject PyGObject_Type;
-extern PyTypeObject PyGInterface_Type;
extern PyTypeObject PyGProps_Type;
extern PyTypeObject PyGPropsDescr_Type;
extern PyTypeObject PyGPropsIter_Type;