summaryrefslogtreecommitdiffstats
path: root/gobject/pygflags.c
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2008-07-27 09:00:06 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-07-27 09:00:06 +0000
commit28cc14391b52dcbef2e148dcc985b2803623234d (patch)
treeb32b6503d4908b8742d74b8040954d273011e592 /gobject/pygflags.c
parent6fafcbb5c9492c0f1c9022389107b7955d9b9318 (diff)
downloadpygobject-28cc14391b52dcbef2e148dcc985b2803623234d.tar.gz
pygobject-28cc14391b52dcbef2e148dcc985b2803623234d.tar.xz
pygobject-28cc14391b52dcbef2e148dcc985b2803623234d.zip
Split out quark and type registration to the respective implementation
2008-07-27 Johan Dahlin <johan@gnome.org> * gobject/Makefile.am: * gobject/gobjectmodule.c (init_gobject): * gobject/pygboxed.c (pygobject_boxed_register_types): * gobject/pygboxed.h: * gobject/pygenum.c (pygobject_enum_register_types): * gobject/pygenum.h: * gobject/pygflags.c (pygobject_flags_register_types): * gobject/pygflags.h: * gobject/pygpointer.c (pygobject_pointer_register_types): * gobject/pygpointer.h: Split out quark and type registration to the respective implementation source files, add headers. svn path=/trunk/; revision=880
Diffstat (limited to 'gobject/pygflags.c')
-rw-r--r--gobject/pygflags.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gobject/pygflags.c b/gobject/pygflags.c
index 2ce2174..57f1ccb 100644
--- a/gobject/pygflags.c
+++ b/gobject/pygflags.c
@@ -27,6 +27,9 @@
#include <pyglib.h>
#include "pygobject-private.h"
+#include "pygflags.h"
+
+GQuark pygflags_class_key;
#define GET_INT_VALUE(x) (((PyIntObject*)x)->ob_ival)
@@ -497,3 +500,12 @@ PyTypeObject PyGFlags_Type = {
0, /* tp_alloc */
pyg_flags_new, /* tp_new */
};
+
+void
+pygobject_flags_register_types(PyObject *d)
+{
+ pygflags_class_key = g_quark_from_static_string("PyGFlags::class");
+
+ PyGFlags_Type.tp_base = &PyInt_Type;
+ PYGOBJECT_REGISTER_GTYPE(d, PyGFlags_Type, "GFlags", G_TYPE_FLAGS);
+}