diff options
author | Colin Walters <walters@verbum.org> | 2010-09-14 13:08:50 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-09-14 13:09:19 -0400 |
commit | d8c4caf990642050049ba0cff7b6916e01c354da (patch) | |
tree | 59c7a00479017f8cb51ff43e89afa5cc8f9d80f2 /giscanner | |
parent | c29368bab2ad74958376576d18365898c6b7ca39 (diff) |
scanner: Add c_type for callbacks
We weren't doing this consistently, which broke nsname != cprefix
cases.
https://bugzilla.gnome.org/show_bug.cgi?id=629683
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/girwriter.py | 2 | ||||
-rw-r--r-- | giscanner/transformer.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/giscanner/girwriter.py b/giscanner/girwriter.py index d3b023a..80e1719 100644 --- a/giscanner/girwriter.py +++ b/giscanner/girwriter.py @@ -430,7 +430,7 @@ and/or use gtk-doc annotations. ''') def _write_callback(self, callback): attrs = [] if callback.namespace: - attrs.append(('c:type', callback.c_name)) + attrs.append(('c:type', callback.ctype or callback.c_name)) self._write_callable(callback, 'callback', attrs) def _write_record(self, record, extra_attrs=[]): diff --git a/giscanner/transformer.py b/giscanner/transformer.py index f9a4ead..02942c8 100644 --- a/giscanner/transformer.py +++ b/giscanner/transformer.py @@ -703,7 +703,8 @@ raise ValueError.""" except TransformerException, e: message.warn(e) return None - callback = ast.Callback(name, retval, parameters, False) + callback = ast.Callback(name, retval, parameters, False, + ctype=symbol.ident) callback.add_symbol_reference(symbol) return callback |