+2008-10-14 Johan Bilien <jobi@via.ecp.fr>
+
+ Bug 556323 – transfer-ownership is wrong for functions returning const
+ char *
+
+ * giscanner/transformer.py: check for a const string as return value,
+ not just const char*. Suggested by Colin Walters
+ * tests/scanner/annotation-1.0-expected.gir: updated expected output
+
2008-10-14 Johan Bilien <jobi@via.ecp.fr>
* girepository/ginfo.c, girepository/girepository.h: add
Parameter, Return, Array, Struct, Field,
Type, Alias, Interface, Class, Node, Union,
List, Map, Varargs, Constant, type_name_from_ctype,
- type_names, default_array_types)
+ type_names, default_array_types, TYPE_STRING)
from giscanner.config import DATADIR
from .glibast import GLibBoxed
from giscanner.sourcescanner import (
resolved_type_name = self._parse_ctype(ctype)
# string memory management
- if ctype == 'char*':
+ if type_name_from_ctype(ctype) == TYPE_STRING:
if source_type.base_type.type_qualifier & TYPE_QUALIFIER_CONST:
options['transfer'] = ['none']
else:
<type name="GObject.Object" c:type="GObject*"/>
</return-value>
<parameters>
- <parameter name="somearg" allow-none="1">
+ <parameter name="somearg" transfer-ownership="full" allow-none="1">
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>