gobject-introspection r707 - in trunk: . giscanner tests/scanner
- From: jobi svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r707 - in trunk: . giscanner tests/scanner
- Date: Tue, 14 Oct 2008 22:51:28 +0000 (UTC)
Author: jobi
Date: Tue Oct 14 22:51:28 2008
New Revision: 707
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=707&view=rev
Log:
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
Modified:
trunk/ChangeLog
trunk/giscanner/transformer.py
trunk/tests/scanner/annotation-1.0-expected.gir
Modified: trunk/giscanner/transformer.py
==============================================================================
--- trunk/giscanner/transformer.py (original)
+++ trunk/giscanner/transformer.py Tue Oct 14 22:51:28 2008
@@ -25,7 +25,7 @@
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 (
@@ -396,7 +396,7 @@
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:
Modified: trunk/tests/scanner/annotation-1.0-expected.gir
==============================================================================
--- trunk/tests/scanner/annotation-1.0-expected.gir (original)
+++ trunk/tests/scanner/annotation-1.0-expected.gir Tue Oct 14 22:51:28 2008
@@ -38,7 +38,7 @@
<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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]