diff options
author | Colin Walters <walters@verbum.org> | 2010-09-08 11:31:02 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-09-08 14:40:16 -0400 |
commit | 35d349b232d80f40242dc45aa90e5ed3eab42c68 (patch) | |
tree | be0a6c33f1c4e77b735cbedf231eccd0f074c738 /giscanner/introspectablepass.py | |
parent | 5140ec172415192af4f406b1fd5ff4615caf1386 (diff) | |
download | gobject-introspection-35d349b232d80f40242dc45aa90e5ed3eab42c68.tar.gz |
scanner: Kill glibast
It was a stupid abstraction split, we only support GObject.
* Clean up how we handle c:type - we only set it if we've actually
seen a corresponding structure.
* Add a warning if we don't see the structure typedef for an
interface, since that's pretty bogus. (And fix regress.h to have
one)
* Rename the "type_name" attribute internally to "gtype_name"
for clarity.
Diffstat (limited to 'giscanner/introspectablepass.py')
-rw-r--r-- | giscanner/introspectablepass.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/giscanner/introspectablepass.py b/giscanner/introspectablepass.py index 290f1d22..1432a107 100644 --- a/giscanner/introspectablepass.py +++ b/giscanner/introspectablepass.py @@ -18,7 +18,6 @@ # from . import ast -from . import glibast from . import message class IntrospectablePass(object): @@ -37,7 +36,7 @@ class IntrospectablePass(object): self._namespace.walk(self._introspectable_pass3) def _interface_vfunc_check(self, node, stack): - if isinstance(node, glibast.GLibInterface): + if isinstance(node, ast.Interface): for vfunc in node.virtual_methods: if not vfunc.invoker: message.warn_node(vfunc, @@ -100,8 +99,8 @@ class IntrospectablePass(object): if (is_return and isinstance(target, (ast.Record, ast.Union)) - and not target.foreign - and not isinstance(target, glibast.GLibBoxed)): + and target.get_type is None + and not target.foreign): if node.transfer != ast.PARAM_TRANSFER_NONE: self._parameter_warning(parent, node, "Invalid non-constant return of bare structure or union; register as boxed type or (skip)") |