From 98a48032cb9c9c139c0a70a89c645ed68d016ff5 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Thu, 14 Jan 2010 16:18:31 +0000 Subject: Bindings: make is_cstring usable with tuple and with direct type --- bindings/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bindings/utils.py') 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') -- cgit