diff options
author | Johan Dahlin <johan@src.gnome.org> | 2008-04-21 14:05:32 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2008-04-21 14:05:32 +0000 |
commit | 94261f3b084fe72ea8459d4b9c133f687e8771d2 (patch) | |
tree | 263cd74d376d26e98d847c85d4d6586ce99dddab /giscanner | |
parent | 4801d9ab18b06d653dc4ea3333bf94c12fb1e779 (diff) | |
download | gobject-introspection-94261f3b084fe72ea8459d4b9c133f687e8771d2.tar.gz |
Rename and refactor internal introspection api and get-type calling
svn path=/trunk/; revision=189
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/gobjecttreebuilder.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/giscanner/gobjecttreebuilder.py b/giscanner/gobjecttreebuilder.py index 5385a491..2e319d09 100644 --- a/giscanner/gobjecttreebuilder.py +++ b/giscanner/gobjecttreebuilder.py @@ -99,12 +99,6 @@ class GObjectTreeBuilder(object): return name - def _call_get_type_function(self, symbol_name): - func = getattr(self._library, symbol_name) - func.restype = cgobject.GType - func.argtypes = [] - return func() - def _parse_node(self, node): if isinstance(node, Enum): self._parse_enum(node) @@ -137,11 +131,13 @@ class GObjectTreeBuilder(object): if func.parameters: return False - type_id = self._call_get_type_function(symbol) - self._parse_gtype(type_id, symbol) + func = getattr(self._library, symbol) + func.restype = cgobject.GType + func.argtypes = [] + type_id = func() + self._introspect_type(type_id, symbol) return True - def _parse_method(self, func): if not func.parameters: return False @@ -178,7 +174,7 @@ class GObjectTreeBuilder(object): return self._add_attribute(struct) - def _parse_gtype(self, type_id, symbol): + def _introspect_type(self, type_id, symbol): fundamental_type_id = cgobject.type_fundamental(type_id) if (fundamental_type_id == cgobject.TYPE_ENUM or fundamental_type_id == cgobject.TYPE_FLAGS): |