17 Dec
2012
17 Dec
'12
1:59 p.m.
Take care using PyObject_IsTrue since it will accept many PyObject's (floats, lists, dicts etc), if you want to be strict with checking your input its not always so good. Instead you can use PyLong_AsLong() this works for True/False and any int type.
eg: int param = PyLong_AsLong(value); if (param == -1 && PyErr_Occurred()) { .... error out ... } ... check the int now ...
On Mon, Dec 17, 2012 at 10:23 PM, Gustavo Carneiro gjcarneiro@gmail.com wrote:
PyObject_IsTrue(
--
- Campbell