PyArg_ParseTupleAndKeywords and optional unicode arguments

R

Roger Upole

I'm having a problem with an extension module using
PyArg_ParseTupleAndKeywords with 2.3.2.
Distilled down:

PyObject *wtf(PyObject *self, PyObject *args, PyObject *kwargs)
{
WCHAR *dummy1=NULL;
WCHAR *dummy2=NULL;
WCHAR *dummy3=NULL;
static char *dummyelements[]={"dummy1","dummy2","dummy3",0};
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|uuu:wtf", dummyelements,
&dummy1, &dummy2, &dummy3))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
Traceback (most recent call last):
File "<stdin>", line 1, in ?

Anybody seen this before, or is this a known problem, or am I just missing
something obvious ?
Any help greatly appreciated.
Roger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top