[gobject-introspection] [scanner] Don't crash if we don't have a ctype in array element types
- From: Tomeu Vizoso <tomeuv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] [scanner] Don't crash if we don't have a ctype in array element types
- Date: Fri, 21 Jan 2011 14:36:58 +0000 (UTC)
commit 313fc70cee983220b7580010062d19aed71a6ab0
Author: Tomeu Vizoso <tomeu vizoso collabora co uk>
Date: Fri Jan 21 15:32:52 2011 +0100
[scanner] Don't crash if we don't have a ctype in array element types
giscanner/maintransformer.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index ee94554..8520dd8 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -326,7 +326,8 @@ usage is void (*_gtk_reserved1)(void);"""
# and no (element-type) means array of Foo
element_type_node = node.type.clone()
# The element's ctype is the array's dereferenced
- if element_type_node.ctype.endswith('*'):
+ if element_type_node.ctype is not None and \
+ element_type_node.ctype.endswith('*'):
element_type_node.ctype = element_type_node.ctype[:-1]
if isinstance(node.type, ast.Array):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]