diff options
author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2018-04-15 00:00:00 +0000 |
---|---|---|
committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2018-04-15 17:01:04 +0200 |
commit | c6646852cd8638d1363ca915bfc2862b4666e067 (patch) | |
tree | 7f6931c5b92f9284461b1c0452af8116bf1ddce8 /giscanner/transformer.py | |
parent | b010c1241227201581841122912f307d2311455a (diff) | |
download | gobject-introspection-c6646852cd8638d1363ca915bfc2862b4666e067.tar.gz |
Use uint8 as default element type when constructing ByteArray.
Fixes issue #184.
Diffstat (limited to 'giscanner/transformer.py')
-rw-r--r-- | giscanner/transformer.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py index 50018cd2..000a4a44 100644 --- a/giscanner/transformer.py +++ b/giscanner/transformer.py @@ -669,9 +669,12 @@ raise ValueError.""" name = base return ast.List(name, ast.TYPE_ANY, ctype=ctype, is_const=is_const, complete_ctype=complete_ctype) - elif base in ('GArray', 'GPtrArray', 'GByteArray', - 'GLib.Array', 'GLib.PtrArray', 'GLib.ByteArray', - 'GObject.Array', 'GObject.PtrArray', 'GObject.ByteArray'): + elif base in ('GByteArray', 'GLib.ByteArray', 'GObject.ByteArray'): + return ast.Array('GLib.ByteArray', ast.TYPE_UINT8, ctype=ctype, + is_const=is_const, complete_ctype=complete_ctype) + elif base in ('GArray', 'GPtrArray', + 'GLib.Array', 'GLib.PtrArray', + 'GObject.Array', 'GObject.PtrArray'): if '.' in base: name = 'GLib.' + base.split('.', 1)[1] else: |