summaryrefslogtreecommitdiff
path: root/giscanner/ast.py
diff options
context:
space:
mode:
authorTorsten Schönfeld <kaffeetisch@gmx.de>2011-08-13 17:28:30 +0200
committerTorsten Schönfeld <kaffeetisch@gmx.de>2011-08-16 18:43:23 +0200
commit169b206cbb4b347e4b17854e8f0c62a40404f803 (patch)
tree929ddaefcedf7c9d4778ea355e58f0b1cc2f2f96 /giscanner/ast.py
parent64848acb817369436d629d153c5750789c0addc3 (diff)
downloadgobject-introspection-169b206cbb4b347e4b17854e8f0c62a40404f803.tar.gz
Allow enums and bitfields to have static methods
This uses the same backcompat machinery that was introduced for static methods for non-class types, so this change does not break users of the existing presentations. New libgirepository API: g_enum_info_get_n_methods g_enum_info_get_method https://bugzilla.gnome.org/show_bug.cgi?id=656499
Diffstat (limited to 'giscanner/ast.py')
-rw-r--r--giscanner/ast.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/giscanner/ast.py b/giscanner/ast.py
index 1433422c..373daa9f 100644
--- a/giscanner/ast.py
+++ b/giscanner/ast.py
@@ -736,6 +736,11 @@ class Enum(Node, Registered):
self.members = members
# Associated error domain name
self.error_domain = None
+ self.static_methods = []
+
+ def _walk(self, callback, chain):
+ for meth in self.static_methods:
+ meth.walk(callback, chain)
class Bitfield(Node, Registered):
@@ -750,6 +755,11 @@ class Bitfield(Node, Registered):
self.ctype = ctype
self.c_symbol_prefix = c_symbol_prefix
self.members = members
+ self.static_methods = []
+
+ def _walk(self, callback, chain):
+ for meth in self.static_methods:
+ meth.walk(callback, chain)
class Member(Annotated):