summaryrefslogtreecommitdiff
path: root/giscanner/annotationparser.py
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/annotationparser.py')
-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