summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/annotationparser.py6
-rw-r--r--giscanner/glibtransformer.py5
2 files changed, 9 insertions, 2 deletions
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
index 85237cd3..d632174c 100644
--- a/giscanner/annotationparser.py
+++ b/giscanner/annotationparser.py
@@ -934,7 +934,11 @@ class AnnotationApplier(object):
else:
return PARAM_TRANSFER_NONE
elif isinstance(node, Return):
- if (node.type.canonical in BASIC_GIR_TYPES or
+ if (isinstance(node.type, Array) and
+ node.type.element_type is not None and
+ node.type.element_type.name == 'utf8'):
+ return PARAM_TRANSFER_FULL
+ elif (node.type.canonical in BASIC_GIR_TYPES or
(node.type.canonical in [TYPE_NONE, TYPE_ANY] and
node.type.is_const)):
return PARAM_TRANSFER_NONE
diff --git a/giscanner/glibtransformer.py b/giscanner/glibtransformer.py
index ca43eb09..2e45b134 100644
--- a/giscanner/glibtransformer.py
+++ b/giscanner/glibtransformer.py
@@ -28,7 +28,7 @@ import subprocess
from .ast import (Alias, Bitfield, Callback, Constant, Enum, Function, Member,
Namespace, Parameter, Property, Record, Return, Type, Union,
Field, VFunction, type_name_from_ctype,
- default_array_types, TYPE_UINT8, PARAM_TRANSFER_FULL)
+ default_array_types, TYPE_UINT8, PARAM_TRANSFER_FULL, Array)
from .transformer import Names
from .glibast import (GLibBoxed, GLibEnum, GLibEnumMember, GLibFlags,
GLibInterface, GLibObject, GLibSignal, GLibBoxedStruct,
@@ -845,6 +845,9 @@ class GLibTransformer(object):
# Workaround glib bug #548689, to be included in 2.18.0
if ptype.name == "GParam":
ptype.name = "GObject.ParamSpec"
+ elif ptype.name == "GObject.Strv":
+ return Array(None, ptype.ctype, Type('utf8'))
+
return self._transformer.resolve_param_type_full(ptype,
self._names,
**kwargs)