diff options
author | Johan Dahlin <johan@gnome.org> | 2008-07-27 09:00:06 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2008-07-27 09:00:06 +0000 |
commit | 28cc14391b52dcbef2e148dcc985b2803623234d (patch) | |
tree | b32b6503d4908b8742d74b8040954d273011e592 /gobject/pygenum.c | |
parent | 6fafcbb5c9492c0f1c9022389107b7955d9b9318 (diff) | |
download | pygobject-28cc14391b52dcbef2e148dcc985b2803623234d.tar.gz |
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/pygenum.c')
-rw-r--r-- | gobject/pygenum.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gobject/pygenum.c b/gobject/pygenum.c index 28bdf70f..9280c879 100644 --- a/gobject/pygenum.c +++ b/gobject/pygenum.c @@ -28,6 +28,8 @@ #include <pyglib.h> #include "pygobject-private.h" +GQuark pygenum_class_key; + static PyObject * pyg_enum_richcompare(PyGEnum *self, PyObject *other, int op) { @@ -360,3 +362,12 @@ PyTypeObject PyGEnum_Type = { pyg_enum_new, /* tp_new */ }; +void +pygobject_enum_register_types(PyObject *d) +{ + pygenum_class_key = g_quark_from_static_string("PyGEnum::class"); + + PyGEnum_Type.tp_base = &PyInt_Type; + PYGOBJECT_REGISTER_GTYPE(d, PyGEnum_Type, "GEnum", G_TYPE_ENUM); + +} |