summaryrefslogtreecommitdiffstats
path: root/bindings/utils.py
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-01-14 16:18:31 +0000
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-01-14 16:18:31 +0000
commit98a48032cb9c9c139c0a70a89c645ed68d016ff5 (patch)
tree759d824f0360f25e21ede8750951c6878b9fce16 /bindings/utils.py
parentf87a55e9ef09d79c0b1ec027a0fa29d2fe1f3c85 (diff)
downloadlasso-98a48032cb9c9c139c0a70a89c645ed68d016ff5.tar.gz
lasso-98a48032cb9c9c139c0a70a89c645ed68d016ff5.tar.xz
lasso-98a48032cb9c9c139c0a70a89c645ed68d016ff5.zip
Bindings: make is_cstring usable with tuple and with direct type
Diffstat (limited to 'bindings/utils.py')
-rw-r--r--bindings/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bindings/utils.py b/bindings/utils.py
index b355f28a..36c3385a 100644
--- a/bindings/utils.py
+++ b/bindings/utils.py
@@ -179,7 +179,9 @@ def is_const(arg):
return bool(re.search(r'\bconst\b', arg_type(arg)))
def is_cstring(arg):
- return unconstify(arg_type(arg)) in ('char*','gchar*','guchar*')
+ if isinstance(arg, tuple):
+ arg = arg_type(arg)
+ return unconstify(arg) in ('char*','gchar*','guchar*','string','utf8')
def is_xml_node(arg):
return unconstify(arg_type(arg)).startswith('xmlNode')