gobject-introspection r1011 - branches/annotation/giscanner
- From: walters svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r1011 - branches/annotation/giscanner
- Date: Sun, 11 Jan 2009 23:25:43 +0000 (UTC)
Author: walters
Date: Sun Jan 11 23:25:42 2009
New Revision: 1011
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=1011&view=rev
Log:
Transfer default fixups
Default to "NONE" for all IN parameters; this more closely matches
how we did transfer in the old system. However - we need to make
an exception for strings (utf8). For some reason those were
FULL, even though that has no meaning.
Also default to NONE for void to match the old system.
Modified:
branches/annotation/giscanner/annotationparser.py
Modified: branches/annotation/giscanner/annotationparser.py
==============================================================================
--- branches/annotation/giscanner/annotationparser.py (original)
+++ branches/annotation/giscanner/annotationparser.py Sun Jan 11 23:25:42 2009
@@ -482,13 +482,15 @@
if node.direction in [PARAM_DIRECTION_INOUT,
PARAM_DIRECTION_OUT]:
return PARAM_TRANSFER_FULL
- # Input basic types default to 'none'
- elif node.type.canonical in BASIC_GIR_TYPES:
- return PARAM_TRANSFER_NONE
- else:
+ # This one is a hack for compatibility; the transfer
+ # for string parameters really has no defined meaning.
+ elif node.type.canonical == 'utf8':
return PARAM_TRANSFER_FULL
+ else:
+ return PARAM_TRANSFER_NONE
elif isinstance(node, Return):
- if node.type.canonical in BASIC_GIR_TYPES:
+ if (node.type.canonical in BASIC_GIR_TYPES or
+ node.type.canonical in [TYPE_NONE, TYPE_ANY]):
return PARAM_TRANSFER_NONE
else:
return PARAM_TRANSFER_FULL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]