From 35d349b232d80f40242dc45aa90e5ed3eab42c68 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 8 Sep 2010 11:31:02 -0400 Subject: 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. --- giscanner/introspectablepass.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'giscanner/introspectablepass.py') 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)") -- cgit v1.2.1