summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@src.gnome.org>2009-01-11 23:37:02 +0000
committerColin Walters <walters@src.gnome.org>2009-01-11 23:37:02 +0000
commit13c2b8521eaa2850d4d935f5a4fe65ade60ca67e (patch)
tree0bdf4b543c10d173c75e0c648c72e66d27a11dc3
parentd07b971d8bbdbec9a3ba4d882c2e6f5725ffded0 (diff)
downloadgobject-introspection-13c2b8521eaa2850d4d935f5a4fe65ade60ca67e.tar.gz
Add compatibility transfer for gpointer returns
This matches the transfer defaults in the old system. svn path=/branches/annotation/; revision=1013
-rw-r--r--giscanner/annotationparser.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
index b8d2a424..82ac15a5 100644
--- a/giscanner/annotationparser.py
+++ b/giscanner/annotationparser.py
@@ -490,7 +490,8 @@ class AnnotationApplier(object):
return PARAM_TRANSFER_NONE
elif isinstance(node, Return):
if (node.type.canonical in BASIC_GIR_TYPES or
- node.type.canonical in [TYPE_NONE, TYPE_ANY]):
+ (node.type.canonical in [TYPE_NONE, TYPE_ANY] and
+ node.type.is_const)):
return PARAM_TRANSFER_NONE
else:
return PARAM_TRANSFER_FULL