From d8c4caf990642050049ba0cff7b6916e01c354da Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 14 Sep 2010 13:08:50 -0400 Subject: 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 --- giscanner/girwriter.py | 2 +- giscanner/transformer.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'giscanner') 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 -- cgit v1.2.3