+2008-11-21 Johan Dahlin <jdahlin@async.com.br>
+
+ Bug 561617 – Return value array annotations
+
+ * giscanner/transformer.py:
+ * tests/scanner/annotation.c (annotation_return_array):
+ * tests/scanner/annotation.h:
+ Add support for (array) for return value annotations as well.
+
2008-11-20 Johan Bilien <jobi@via.ecp.fr>
* tests/everything/everything.[ch]: add a test function which calls a
raise ValueError("Unmatched length parameter name %r"\
% (target_name, ))
- def _pair_annotations(self, params):
+ def _pair_annotations(self, params, return_):
names = {}
for param in params:
if param.name in names:
if isinstance(param.type, Array):
self._pair_array(params, param)
+ if isinstance(return_.type, Array):
+ self._pair_array(params, return_)
+
# We take the annotations from the parser as strings; here we
# want to split them into components, so:
# (transfer full) -> {'transfer' : [ 'full' ]}
directives = symbol.directives()
parameters = list(self._create_parameters(
symbol.base_type, directives))
- self._pair_annotations(parameters)
return_ = self._create_return(symbol.base_type.base_type,
directives.get('return', {}))
+ self._pair_annotations(parameters, return_)
name = self._strip_namespace_func(symbol.ident)
func = Function(name, return_, parameters, symbol.ident)
self._parse_deprecated(func, directives)
if option in ('transfer', 'transfer-inferred',
'element-type', 'out'):
pass
+ elif option.startswith(('element-type', 'array')):
+ pass
else:
print 'Unhandled return type annotation option: %r' % (
option, )