diff options
author | Giovanni Campagna <gcampagna@src.gnome.org> | 2011-08-18 17:29:21 +0200 |
---|---|---|
committer | Giovanni Campagna <gcampagna@src.gnome.org> | 2011-08-18 17:34:13 +0200 |
commit | cbf0dc099aa335c95b554eb315a74ec9c3c8f8ae (patch) | |
tree | 0026fd8a36826ae16526edfbb67d09041679ce53 /giscanner/maintransformer.py | |
parent | cf2ed9ffe5c01fc33d6402aae9c9a8ac6c737007 (diff) | |
download | gobject-introspection-cbf0dc099aa335c95b554eb315a74ec9c3c8f8ae.tar.gz |
Add tests for newly added warnings
g-ir-scanner now warns for invalid (element-type) annotations
in GPtrArray and in GByteArray. Test that.
Diffstat (limited to 'giscanner/maintransformer.py')
-rw-r--r-- | giscanner/maintransformer.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py index dafdcade..397bb606 100644 --- a/giscanner/maintransformer.py +++ b/giscanner/maintransformer.py @@ -326,9 +326,9 @@ usage is void (*_gtk_reserved1)(void);""" # (except enums and flags) or basic types that are # as big as a gpointer if array.array_type == ast.Array.GLIB_PTRARRAY and \ - ((array.element_type in ast.BASIC_GIR_TYPES \ - and not array.element_type in ast.POINTER_TYPES) or \ - isinstance(array.element_type, ast.Enum) or \ + ((array.element_type in ast.BASIC_GIR_TYPES + and not array.element_type in ast.POINTER_TYPES) or + isinstance(array.element_type, ast.Enum) or isinstance(array.element_type, ast.Bitfield)): message.warn("invalid (element-type) for a GPtrArray, " "must be a pointer", options.position) |