summaryrefslogtreecommitdiffstats
path: root/gobject/pygobject.c
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2004-07-18 19:30:34 +0000
committerJohan Dahlin <johan@src.gnome.org>2004-07-18 19:30:34 +0000
commit0caf54f414b108603c1e0f57f0e31489fdc31d32 (patch)
treebefb5168c006019807ca94ce25012aab9ff50929 /gobject/pygobject.c
parent3b9951be52eeac3d76755808eafcdca864bc4e74 (diff)
New getters
* gobject/pygflags.c (pyg_flags_get_value_nicks) (pyg_flags_get_value_names): New getters * gobject/pygenum.c (pyg_enum_get_value_nick) (pyg_enum_get_value_name): New getters * gobject/gobjectmodule.c (pyg_param_spec_getattr): add enum_class and flags_class properties.
Diffstat (limited to 'gobject/pygobject.c')
-rw-r--r--gobject/pygobject.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/gobject/pygobject.c b/gobject/pygobject.c
index 6c1a6f0..8b33744 100644
--- a/gobject/pygobject.c
+++ b/gobject/pygobject.c
@@ -255,9 +255,8 @@ pygobject_new_with_interfaces(GType gtype)
return NULL;
}
-#if 1
/* Workaround python tp_(get|set)attr slot inheritance bug.
- * Fixes pygtk bug #144135. */
+ * Fixes bug #144135. */
if (!type->tp_getattr && py_parent_type->tp_getattr) {
type->tp_getattro = NULL;
type->tp_getattr = py_parent_type->tp_getattr;
@@ -266,19 +265,12 @@ pygobject_new_with_interfaces(GType gtype)
type->tp_setattro = NULL;
type->tp_setattr = py_parent_type->tp_setattr;
}
-#endif
-#if 0
- type->tp_dealloc = (destructor)pygobject_dealloc;
- type->tp_traverse = (traverseproc)pygobject_traverse;
- type->tp_clear = (inquiry)pygobject_clear;
- type->tp_flags |= Py_TPFLAGS_HAVE_GC;
-#endif
-
if (PyType_Ready(type) < 0) {
g_warning ("couldn't make the type `%s' ready", type->tp_name);
return NULL;
}
+
/* insert type name in module dict */
modules = PyImport_GetModuleDict();
if ((module = PyDict_GetItemString(modules, mod_name)) != NULL) {