diff options
author | Colin Walters <walters@verbum.org> | 2015-09-27 14:32:38 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2015-09-27 14:32:45 -0400 |
commit | 7c37a16ade424cf063414ce0dd4d170fd2f9c9b1 (patch) | |
tree | 0b09436c3e8c6dafd98c2e539fc9d2d8c8aecd6e /giscanner/testcodegen.py | |
parent | 4d9453f218074d03a5c44dbd44eeadb8e9e89f6c (diff) | |
download | gobject-introspection-7c37a16ade424cf063414ce0dd4d170fd2f9c9b1.tar.gz |
scanner: Warn and ignore on incorrect transfer annotations
This reverts commit 232f3c831260f596e36159112292897962a505b4.
Diffstat (limited to 'giscanner/testcodegen.py')
-rw-r--r-- | giscanner/testcodegen.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/giscanner/testcodegen.py b/giscanner/testcodegen.py index 32139e3b..5080ed1b 100644 --- a/giscanner/testcodegen.py +++ b/giscanner/testcodegen.py @@ -65,6 +65,9 @@ class EverythingCodeGenerator(object): include_last_src) def write(self): + types = [ast.TYPE_ANY] + types.extend(ast.INTROSPECTABLE_BASIC) + func = ast.Function('nullfunc', ast.Return(ast.TYPE_NONE, transfer=ast.PARAM_TRANSFER_NONE), [], False, self.gen.gen_symbol('nullfunc')) @@ -74,7 +77,7 @@ class EverythingCodeGenerator(object): # First pass, generate constant returns prefix = 'const return ' - for typeval in ast.INTROSPECTABLE_BASIC: + for typeval in types: name = prefix + uscore_from_type(typeval) sym = self.gen.gen_symbol(name) func = ast.Function(name, @@ -87,7 +90,7 @@ class EverythingCodeGenerator(object): # Void return, one parameter prefix = 'oneparam ' - for typeval in ast.INTROSPECTABLE_BASIC: + for typeval in types: if typeval is ast.TYPE_NONE: continue name = prefix + uscore_from_type(typeval) @@ -101,7 +104,7 @@ class EverythingCodeGenerator(object): # Void return, one (out) parameter prefix = 'one_outparam ' - for typeval in ast.INTROSPECTABLE_BASIC: + for typeval in types: if typeval is ast.TYPE_NONE: continue name = prefix + uscore_from_type(typeval) @@ -119,7 +122,7 @@ class EverythingCodeGenerator(object): # Passthrough one parameter prefix = 'passthrough_one ' - for typeval in ast.INTROSPECTABLE_BASIC: + for typeval in types: if typeval is ast.TYPE_NONE: continue name = prefix + uscore_from_type(typeval) |