[Python-Dev] Baffled by PyArg_ParseTupleAndKeywords modification (original) (raw)
Jack Jansen Jack.Jansen at cwi.nl
Tue Feb 14 13:59:31 CET 2006
- Previous message: [Python-Dev] Baffled by PyArg_ParseTupleAndKeywords modification
- Next message: [Python-Dev] Baffled by PyArg_ParseTupleAndKeywords modification
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks to all for a rather insightful discussion, it's always fun to
learn that after 28 years of C programming the language still has
little corners that I know absolutely nothing about:-)
Practically speaking, though, I've adopted MAL's solution for the
time being:
/* The keyword array changed to const char* in Python 2.5 */ #if PYVERSIONHEX >= 0x02050000 # define PyKEYWORDSSTRINGTYPE const char #else # define PyKEYWORDSSTRINGTYPE char #endif ... static PyKEYWORDSSTRINGTYPE *kwslist[] = {"yada", NULL}; ... if (!PyArgParseTupleAndKeywords(args,kws,format,kwslist,&a1)) goto onError;
At least this appears to work...
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma
Goldman
- Previous message: [Python-Dev] Baffled by PyArg_ParseTupleAndKeywords modification
- Next message: [Python-Dev] Baffled by PyArg_ParseTupleAndKeywords modification
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]