Args not set in extension class

Gorny gorny0 at
Sat Jun 15 14:21:57 CEST 2002


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);



"Spread the sources"

More information about the Python-list mailing list