Re: PyArg_ParseTuple and dict

2005-06-05 Thread Jeff Epler
I tried to recreate the problem based on what you described in your message. I was unable to recreate the problem. I wrote the following file "sjh.c": #include PyObject *f(PyObject *self, PyObject *args) { PyObject *ob = NULL; if(!PyArg_ParseTuple(args, "O", &ob)) return NULL; Py_I

Re: PyArg_ParseTuple and dict

2005-06-05 Thread John Machin
[EMAIL PROTECTED] wrote: >>3. What is your platform? Which C compiler? What warnings does it give, >>[or would it give if allowed free speech]? Are you running Python 2.4 or >>2.4.1? > > > Python 2.4 (#1, Mar 10 2005, 16:54:23) [C] on sunos5 > > Solaris 9 x86, forte 6.2 > warnings? > > >>4

Re: PyArg_ParseTuple and dict

2005-06-05 Thread [EMAIL PROTECTED]
> 1. On the surface, there appears to be a bug. In the interests of > finding out where the bug is, perhaps it would be better if you posted > your minimal compilable runnable example of what *doesn't* work. I'll post it later tonight. > 2. To get you off the ground: *if* there is only one argume

Re: PyArg_ParseTuple and dict

2005-06-05 Thread John Machin
[EMAIL PROTECTED] wrote: > I'm trying to write an extension for python 2.4, and I can't seem to > get PyArg_ParseTuple to work with a dict. I've tried all sorts of > things, but the most simple thing that fails is: > > [...] > if (!PyArg_ParseTuple(args, "O", &file)) { > return NULL; >

PyArg_ParseTuple and dict

2005-06-05 Thread [EMAIL PROTECTED]
I'm trying to write an extension for python 2.4, and I can't seem to get PyArg_ParseTuple to work with a dict. I've tried all sorts of things, but the most simple thing that fails is: [...] if (!PyArg_ParseTuple(args, "O", &file)) { return NULL; } [...] If I call the function from