diff options
author | Johan Dahlin <johan@src.gnome.org> | 2005-03-15 20:40:38 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2005-03-15 20:40:38 +0000 |
commit | 989f5704b31a98f0eaff060563ae4ba1bb63d7e0 (patch) | |
tree | 6f56cf856c8c1566c21a9702c292ad85f9b56b24 /codegen | |
parent | 6e70ba554cd0556f405450fa0c2bba45363815f0 (diff) | |
download | pygtk-989f5704b31a98f0eaff060563ae4ba1bb63d7e0.tar.gz |
Check arguments if we have no arguments. Fixes bug #170266 (Doug Quale)
* codegen/codegen.py: Check arguments if we have no arguments.
Fixes bug #170266 (Doug Quale)
Diffstat (limited to 'codegen')
-rw-r--r-- | codegen/codegen.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/codegen/codegen.py b/codegen/codegen.py index 3afd3d59..6aaa855c 100644 --- a/codegen/codegen.py +++ b/codegen/codegen.py @@ -789,12 +789,16 @@ class GObjectWrapper(Wrapper): print >> out, " for (i = 0; i < nparams; ++i)" print >> out, " g_value_unset(¶ms[i].value);" else: + print >> out, " static char* kwlist[] = { NULL };"; print >> out if constructor.deprecated is not None: print >> out, ' if (PyErr_Warn(PyExc_DeprecationWarning, "%s") < 0)' %\ constructor.deprecated print >> out, ' return -1;' print >> out + print >> out, ' if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":%s.__init__", kwlist))' % classname + print >> out, " return -1;" + print >> out print >> out, " self->obj = g_object_newv(obj_type, 0, NULL);" print >> out, \ |