[gobject-introspection/wip/transformer] Fix transfer defaults for TYPE_NONE
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/wip/transformer] Fix transfer defaults for TYPE_NONE
- Date: Wed, 28 Jul 2010 21:41:14 +0000 (UTC)
commit 281888478d8413a3b458580954be57a799d97409
Author: Colin Walters <walters verbum org>
Date: Wed Jul 28 16:20:22 2010 -0400
Fix transfer defaults for TYPE_NONE
giscanner/primarytransformer.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/giscanner/primarytransformer.py b/giscanner/primarytransformer.py
index e1aab81..71799b9 100644
--- a/giscanner/primarytransformer.py
+++ b/giscanner/primarytransformer.py
@@ -273,7 +273,7 @@ class PrimaryTransformer(object):
if node.transfer is not None:
return node.transfer
- if node.type in [TYPE_NONE, TYPE_ANY]:
+ if node.type.is_equiv(TYPE_NONE):
return PARAM_TRANSFER_NONE
elif isinstance(node.type, Varargs):
return PARAM_TRANSFER_NONE
@@ -286,9 +286,8 @@ class PrimaryTransformer(object):
return PARAM_TRANSFER_NONE
elif isinstance(node, Return):
if (node.type.is_equiv(BASIC_GIR_TYPES) or
- node.type.is_equiv((TYPE_STRING, TYPE_FILENAME)) or
- (node.type.is_equiv([TYPE_NONE, TYPE_ANY]) and
- node.type.is_const)):
+ (node.type.is_equiv((TYPE_STRING, TYPE_FILENAME, TYPE_ANY))
+ and node.type.is_const)):
return PARAM_TRANSFER_NONE
elif node.type.target_fundamental:
# This looks like just GType right now
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]