diff options
author | Torsten Schönfeld <kaffeetisch@gmx.de> | 2011-08-13 17:28:30 +0200 |
---|---|---|
committer | Torsten Schönfeld <kaffeetisch@gmx.de> | 2011-08-16 18:43:23 +0200 |
commit | 169b206cbb4b347e4b17854e8f0c62a40404f803 (patch) | |
tree | 929ddaefcedf7c9d4778ea355e58f0b1cc2f2f96 /giscanner/girwriter.py | |
parent | 64848acb817369436d629d153c5750789c0addc3 (diff) | |
download | gobject-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/girwriter.py')
-rw-r--r-- | giscanner/girwriter.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/giscanner/girwriter.py b/giscanner/girwriter.py index f9937291..f1e150df 100644 --- a/giscanner/girwriter.py +++ b/giscanner/girwriter.py @@ -337,6 +337,8 @@ and/or use gtk-doc annotations. ''') self._write_generic(enum) for member in enum.members: self._write_member(member) + for method in sorted(enum.static_methods): + self._write_static_method(method) def _write_bitfield(self, bitfield): attrs = [('name', bitfield.name)] @@ -348,6 +350,8 @@ and/or use gtk-doc annotations. ''') self._write_generic(bitfield) for member in bitfield.members: self._write_member(member) + for method in sorted(bitfield.static_methods): + self._write_static_method(method) def _write_member(self, member): attrs = [('name', member.name), |