diff options
author | Dan Winship <danw@gnome.org> | 2009-11-22 12:49:37 -0500 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2009-11-23 11:07:29 -0500 |
commit | 91cc82321e38febd65cd79ecaef2850b475f8ff2 (patch) | |
tree | 06c8f31e972f71e41b530ae2b301ccf3b581b228 | |
parent | ab127091d84336a851e0cec9cfdd0435065d9e2a (diff) | |
download | gobject-introspection-91cc82321e38febd65cd79ecaef2850b475f8ff2.tar.gz |
Make (skip) annotation work everywhere
Previously it only worked for toplevel nodes. Now it works for any
node except <field>, since skipping a field would cause the
description of the struct layout to be wrong.
https://bugzilla.gnome.org/show_bug.cgi?id=602652
-rw-r--r-- | giscanner/girwriter.py | 8 | ||||
-rw-r--r-- | tests/scanner/foo.c | 11 | ||||
-rw-r--r-- | tests/scanner/foo.h | 2 |
3 files changed, 21 insertions, 0 deletions
diff --git a/giscanner/girwriter.py b/giscanner/girwriter.py index 76a77d80..78e34c9c 100644 --- a/giscanner/girwriter.py +++ b/giscanner/girwriter.py @@ -152,6 +152,8 @@ and/or use gtk-doc annotations. ''') self.write_tag('alias', attrs) def _write_callable(self, callable, tag_name, extra_attrs): + if callable.skip: + return attrs = [('name', callable.name)] attrs.extend(extra_attrs) if callable.doc: @@ -304,6 +306,8 @@ and/or use gtk-doc annotations. ''') self._write_member(member) def _write_member(self, member): + if member.skip: + return attrs = [('name', member.name), ('value', str(member.value)), ('c:identifier', member.symbol)] @@ -376,6 +380,8 @@ and/or use gtk-doc annotations. ''') self._write_method(method) def _write_property(self, prop): + if prop.skip: + return attrs = [('name', prop.name)] self._append_version(prop, attrs) self._append_deprecated(prop, attrs) @@ -493,6 +499,8 @@ and/or use gtk-doc annotations. ''') self._write_type(field.type) def _write_signal(self, signal): + if signal.skip: + return attrs = [('name', signal.name)] if signal.doc: attrs.append(('doc', signal.doc)) diff --git a/tests/scanner/foo.c b/tests/scanner/foo.c index e810b522..d2fb23b2 100644 --- a/tests/scanner/foo.c +++ b/tests/scanner/foo.c @@ -255,6 +255,17 @@ foo_object_read (FooObject *object, int offset, int length) } +/** + * foo_object_skipped_method: (skip) + * @object: obj + * + * This is only useful from C. + */ +void +foo_object_skipped_method (FooObject *object) +{ +} + G_DEFINE_ABSTRACT_TYPE (FooSubobject, foo_subobject, FOO_TYPE_OBJECT); static void diff --git a/tests/scanner/foo.h b/tests/scanner/foo.h index 199d57a0..b8f88a78 100644 --- a/tests/scanner/foo.h +++ b/tests/scanner/foo.h @@ -125,6 +125,8 @@ void foo_object_read (FooObject *object, int offse int foo_object_static_meth (void); +void foo_object_skipped_method (FooObject *object); + struct _FooSubobject { FooObject parent_instance; |