pybank r89 - trunk/bank
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: pybank r89 - trunk/bank
- Date: Fri, 5 Dec 2008 14:37:00 +0000 (UTC)
Author: zeeshanak
Date: Fri Dec 5 14:37:00 2008
New Revision: 89
URL: http://svn.gnome.org/viewvc/pybank?rev=89&view=rev
Log:
Add support for boolean arguments.
Modified:
trunk/bank/bank-argument.c
trunk/bank/btypes.py
Modified: trunk/bank/bank-argument.c
==============================================================================
--- trunk/bank/bank-argument.c (original)
+++ trunk/bank/bank-argument.c Fri Dec 5 14:37:00 2008
@@ -42,6 +42,7 @@
break;
case GI_TYPE_TAG_INT8:
case GI_TYPE_TAG_INT:
+ case GI_TYPE_TAG_BOOLEAN:
arg.v_int = PyInt_AsLong(object);
break;
case GI_TYPE_TAG_INTERFACE:
Modified: trunk/bank/btypes.py
==============================================================================
--- trunk/bank/btypes.py (original)
+++ trunk/bank/btypes.py Fri Dec 5 14:37:00 2008
@@ -49,6 +49,9 @@
elif tag == repo.TYPE_TAG_INTERFACE:
# TODO
pass
+ elif tag == repo.TYPE_TAG_BOOLEAN:
+ if not isinstance(value, bool):
+ raise TypeError("%s must be bool, not %s" % (name, type(value).__name__))
elif tag == repo.TYPE_TAG_ARRAY:
if value is not None:
raise TypeError("Must pass None for arrays currently")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]