Args not set in extension class

Gorny gorny0 at zonnet.nl
Sat Jun 15 13:07:03 EDT 2002


"Gorny" <gorny0 at zonnet.nl> schreef in bericht
news:aefcav$8ef$1 at reader05.wxs.nl...
> 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...

I've already dealt with the problem... Just create a function like:

static PyObject *
wrap_pkt_object(PyObject *self, PyObject *args)
{
        PyObject * return_object;
        return_object = new_pkt_object(args);
        return return_object;
}

But it would be very nice if someone can explain to me, why this
is happening and it isn't possible to *directly* call new_pkt_object even
if you prototype the latter function with two arguments like
wrap_pkt_object!

Gorny

--
"Spread the sources"
http://gorny.cjb.net






More information about the Python-list mailing list