summaryrefslogtreecommitdiffstats
path: root/gobject/gobjectmodule.c
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2000-11-09 10:06:00 +0000
committerJames Henstridge <jamesh@src.gnome.org>2000-11-09 10:06:00 +0000
commit5e9e2566e8e4bd1bb611a7409478abde7bd98f9c (patch)
tree3a129c9c5dcdd58e27d65c2fbe5fc895317f3ecd /gobject/gobjectmodule.c
parent3bb84f9f11b80b2fe50a1a7496df929d04fc5d3d (diff)
downloadpygobject-5e9e2566e8e4bd1bb611a7409478abde7bd98f9c.tar.gz
pygobject-5e9e2566e8e4bd1bb611a7409478abde7bd98f9c.tar.xz
pygobject-5e9e2566e8e4bd1bb611a7409478abde7bd98f9c.zip
change code generator to pass bases in as a tuple rather than a single
2000-11-09 James Henstridge <james@daa.com.au> * codegen/codegen.py (write_source): change code generator to pass bases in as a tuple rather than a single PyExtensionClass structure. * pygobject.h: change prototype. * gobjectmodule.c (pygobject_register_class): allow for registerin a type with multiple base classes.
Diffstat (limited to 'gobject/gobjectmodule.c')
-rw-r--r--gobject/gobjectmodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c
index 9790a9a..4eef252 100644
--- a/gobject/gobjectmodule.c
+++ b/gobject/gobjectmodule.c
@@ -29,7 +29,7 @@ pygobject_destroy_notify(gpointer user_data)
static void
pygobject_register_class(PyObject *dict, const gchar *class_name,
- PyExtensionClass *ec, PyExtensionClass *parent)
+ PyExtensionClass *ec, PyObject *bases)
{
if (!class_hash)
class_hash = g_hash_table_new(g_str_hash, g_str_equal);
@@ -42,9 +42,9 @@ pygobject_register_class(PyObject *dict, const gchar *class_name,
if (!ec->tp_repr) ec->tp_repr = (reprfunc)pygobject_repr;
if (!ec->tp_hash) ec->tp_hash = (hashfunc)pygobject_hash;
- if (parent) {
- PyExtensionClass_ExportSubclassSingle(dict, (char *)class_name,
- *ec, *parent);
+ if (bases) {
+ PyExtensionClass_ExportSubclass(dict, (char *)class_name,
+ *ec, bases);
} else {
PyExtensionClass_Export(dict, (char *)class_name, *ec);
}