diff options
| author | Gustavo J. A. M. Carneiro <gjc@src.gnome.org> | 2005-05-28 15:26:59 +0000 |
|---|---|---|
| committer | Gustavo J. A. M. Carneiro <gjc@src.gnome.org> | 2005-05-28 15:26:59 +0000 |
| commit | f1b1ae700dd247b387d8b22f36e50bf40e936eba (patch) | |
| tree | 401d6ac81f271db868d3711649234f9328d482cf /gobject/pygobject.c | |
| parent | bc6b796d83f1022c6335c6360fc557d531ac0415 (diff) | |
gquark initialization cleanup
Diffstat (limited to 'gobject/pygobject.c')
| -rw-r--r-- | gobject/pygobject.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/gobject/pygobject.c b/gobject/pygobject.c index fdc9026..691b1f1 100644 --- a/gobject/pygobject.c +++ b/gobject/pygobject.c @@ -21,11 +21,6 @@ */ #include "pygobject-private.h" -static const gchar *pygobject_class_id = "PyGObject::class"; -static GQuark pygobject_class_key = 0; -static const gchar *pygobject_wrapper_id = "PyGObject::wrapper"; -static GQuark pygobject_wrapper_key = 0; - static void pygobject_dealloc(PyGObject *self); static int pygobject_traverse(PyGObject *self, visitproc visit, void *arg); static int pygobject_clear(PyGObject *self); @@ -106,8 +101,6 @@ pygobject_register_class(PyObject *dict, const gchar *type_name, PyObject *o; const char *class_name, *s; - if (!pygobject_class_key) - pygobject_class_key = g_quark_from_static_string(pygobject_class_id); class_name = type->tp_name; s = strrchr(class_name, '.'); @@ -158,9 +151,6 @@ pygobject_register_wrapper(PyObject *self) { GObject *obj = ((PyGObject *)self)->obj; - if (!pygobject_wrapper_key) - pygobject_wrapper_key=g_quark_from_static_string(pygobject_wrapper_id); - sink_object(obj); Py_INCREF(self); g_object_set_qdata_full(obj, pygobject_wrapper_key, self, @@ -283,9 +273,6 @@ pygobject_new_with_interfaces(GType gtype) PyDict_SetItemString(mod_dict, gtype_name, (PyObject *)type); } - if (!pygobject_class_key) - pygobject_class_key = g_quark_from_static_string(pygobject_class_id); - /* stash a pointer to the python class with the GType */ Py_INCREF(type); g_type_set_qdata(gtype, pygobject_class_key, type); @@ -341,9 +328,6 @@ pygobject_new(GObject *obj) { PyGObject *self; - if (!pygobject_wrapper_key) - pygobject_wrapper_key = g_quark_from_static_string(pygobject_wrapper_id); - if (obj == NULL) { Py_INCREF(Py_None); return Py_None; |
