For string parameters allow transfer annotation to override the standard
authorOwen Taylor <otaylor@redhat.com>
Tue, 21 Oct 2008 17:41:32 +0000 (17:41 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Tue, 21 Oct 2008 17:41:32 +0000 (17:41 +0000)
2008-10-21  Owen Taylor  <otaylor@redhat.com>

        * giscanner/transformer.py: For string parameters allow transfer annotation
        to override the standard automatic guessing based on 'const'.

svn path=/trunk/; revision=775

ChangeLog
giscanner/transformer.py

index 82af9aa8208331b388fc1f2dc187baed266e84e5..7f8a5936809132fb853aa3db494e3679dc7198ac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-21  Owen Taylor  <otaylor@redhat.com>
+
+       * giscanner/transformer.py: For string parameters allow transfer annotation
+       to override the standard automatic guessing based on 'const'.
+
 2008-10-21  Johan Bilien  <jobi@via.ecp.fr>
 
        Bug 557241 – "throws" flag for functions
index 489a7c354ae17a73a21604ef5caa806fc58ad2c5..6fcdd34e63551409426ecd108b1420f1721f8bfb 100644 (file)
@@ -402,7 +402,7 @@ class Transformer(object):
             return result
 
         # string memory management - we just look at 'const'
-        if type_name_from_ctype(ctype) == TYPE_STRING:
+        if type_name_from_ctype(ctype) == TYPE_STRING and 'transfer' not in options:
             if source_type.base_type.type_qualifier & TYPE_QUALIFIER_CONST:
                 options['transfer'] = ['none']
             else: