[gobject-introspection/wip/transformer] major: Handle GStrv -> char **
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/wip/transformer] major: Handle GStrv -> char **
- Date: Mon, 23 Aug 2010 19:34:50 +0000 (UTC)
commit e69f55ca8032b1fb572fdc768e99d35f795adb7b
Author: Colin Walters <walters verbum org>
Date: Mon Aug 23 15:32:36 2010 -0400
major: Handle GStrv -> char **
giscanner/transformer.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index 08a7ef1..f6639a6 100644
--- a/giscanner/transformer.py
+++ b/giscanner/transformer.py
@@ -597,15 +597,15 @@ it is always biggest (i.e. last)."""
def create_type_from_ctype_string(self, ctype, is_const=False,
is_parameter=False, is_return=False):
canonical = self._canonicalize_ctype(ctype)
-
- # Special default: char ** -> ast.Array
- if is_return and canonical == 'utf8*':
- element_type = ast.Type(target_fundamental='utf8')
- return ast.Array(None, element_type, ctype=ctype,
- is_const=is_const)
-
base = canonical.replace('*', '')
+ # Special default: char ** -> ast.Array, same for GStrv
+ if (is_return and canonical == 'utf8*') or base == 'GStrv':
+ bare_utf8 = ast.TYPE_STRING.clone()
+ bare_utf8.ctype = None
+ return ast.Array(None, bare_utf8, ctype=ctype,
+ is_const=is_const)
+
fundamental = ast.type_names.get(base)
if fundamental is not None:
return ast.Type(target_fundamental=fundamental.target_fundamental,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]