diff options
author | James Henstridge <james@daa.com.au> | 2002-06-09 14:00:35 +0000 |
---|---|---|
committer | James Henstridge <jamesh@src.gnome.org> | 2002-06-09 14:00:35 +0000 |
commit | 5aefcc17b34ef23755c556f6ea993a4cca6f0598 (patch) | |
tree | 90625bcf86180bfcd1a22c85e5bc80364eb5ec03 /codegen | |
parent | de8ac6beb1b809e1a57c0ba2a2a02d4771fc5957 (diff) | |
download | pygtk-5aefcc17b34ef23755c556f6ea993a4cca6f0598.tar.gz |
if the ptype is different to self.typecode, cast the event
2002-06-09 James Henstridge <james@daa.com.au>
* codegen/argtypes.py (BoxedArg.write_param): if the ptype is
different to self.typecode, cast the event
* gtk/gdk-types.defs (EventExpose): remove definition, as it
breaks stuff.
Diffstat (limited to 'codegen')
-rw-r--r-- | codegen/argtypes.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/codegen/argtypes.py b/codegen/argtypes.py index a253253a..f2b4805c 100644 --- a/codegen/argtypes.py +++ b/codegen/argtypes.py @@ -433,7 +433,15 @@ class BoxedArg(ArgType): info.codebefore.append(self.check % {'name': pname, 'typename': self.typename, 'typecode': self.typecode}) - info.arglist.append(pname) + if ptype[-1] == '*': + typename = ptype[:-1] + if typename[:6] == 'const-': typename = typename[6:] + if typename != self.typename: + info.arglist.append('(%s *)%s' % (ptype[:-1], pname)) + else: + info.arglist.append(pname) + else: + info.arglist.append(pname) info.add_parselist('O', ['&py_' + pname], [pname]) ret_tmpl = ' /* pyg_boxed_new handles NULL checking */\n' \ ' return pyg_boxed_new(%(typecode)s, %(ret)s, %(copy)s, TRUE);' |