Args not set in extension class
Gorny
gorny0 at zonnet.nl
Sat Jun 15 08:21:57 EDT 2002
Hi,
I'm having some difficulty writing an extension class. The Python
core doesn't seem to set the args argument from the new_pkt_object
function! It's allways set to NULL so the code beneath will allways
end in a Segmentation Fault when importing this class from my libraries...
pkt_object *
new_pkt_object(PyObject *args) {
pkt_object *self;
char * prot;
if (!PyArg_ParseTuple(args, "s:new_pkt_object", &prot))
return NULL;
self = PyObject_New(pkt_object, &pkt_object_type);
[.....]
Gorny
--
"Spread the sources"
http://gorny.cjb.net
More information about the Python-list
mailing list