[gobject-introspection] Teach scanner's girparser about fundamentals
- From: Pavel Holejsovsky <pholejs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] Teach scanner's girparser about fundamentals
- Date: Tue, 16 Aug 2011 08:43:38 +0000 (UTC)
commit 64848acb817369436d629d153c5750789c0addc3
Author: Pavel Holejsovsky <pholejs src gnome org>
Date: Sat Aug 13 13:10:34 2011 +0200
Teach scanner's girparser about fundamentals
Make sure that fundamental attribute and associated
functions (ref-func, unref-func, set-value-func and get-value-func)
are parsed, otherwise we fail reparse-validating girs containing
fundamentals.
giscanner/girparser.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/giscanner/girparser.py b/giscanner/girparser.py
index d7a59b8..51ef934 100644
--- a/giscanner/girparser.py
+++ b/giscanner/girparser.py
@@ -239,6 +239,14 @@ class GIRParser(object):
type_struct = node.attrib.get(_glibns('type-struct'))
if type_struct:
obj.glib_type_struct = self._namespace.type_from_name(type_struct)
+ if klass == ast.Class:
+ is_fundamental = node.attrib.get(_glibns('fundamental'))
+ if is_fundamental and is_fundamental != '0':
+ obj.fundamental = True
+ for func_id in ['ref-func', 'unref-func',
+ 'set-value-func', 'get-value-func']:
+ func_name = node.attrib.get(_glibns(func_id))
+ obj.__dict__[func_id.replace('-', '_')] = func_name
self._namespace.append(obj)
if self._types_only:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]