Re: always getting 'None' return value from PyObject_CallObject

2008-03-23 Thread NotGuru
On Mar 23, 6:43 pm, Gal Aviel <[EMAIL PROTECTED]> wrote: > Hello all, > > Kinda desperate over here .. Any help would be greatly appreciated ! > > I'm trying to embed a Python interpreter inside a Verilog simulator as a > SystemVerilog DPI application. The python side implements a few SV exported >

Re: PyTuple_Check and other type check functions didn't check the NULL pointer

2008-03-23 Thread NotGuru
On Mar 23, 8:24 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > NotGuru schrieb: > > > My questions is: is it necessary to check the null pointer in the > > macro or it's a job for the user? Semantically all the type check > > should report a false if a null p

PyTuple_Check and other type check functions didn't check the NULL pointer

2008-03-23 Thread NotGuru
I was writing some C extensions for Python and use PyTupleType_Check extensively. I found that all the PySomeType_Check macros directly delegate the job to PyObject_TypeCheck(op, &PyType_Type). The PyObject_TypeCheck(op, &PyType_Type) is again a macro and defined as ((ob)->ob_type == (tp) || PyType