thanks for the tip, however even when I do not free aString or bString, i'm still crashing at the malloc in the c function, not the wrapper.
Bernhard Herzog wrote: > "Java and Swing" <[EMAIL PROTECTED]> writes: > > > static PyObject *wrap_doStuff(PyObject *self, PyObject *args) { > [...] > > char *aString = 0; > > char *bString = 0; > [...] > > int ok = PyArg_ParseTuple(args, "sss", &in, &aString, &bString); > [...] > > free(aString); > > free(bString); > > aString and bString are pointers to memory managed by the strings in > your args tuple. You must not free them! The memory is automatically > managed by Python. > > Bernhard > > -- > Intevation GmbH http://intevation.de/ > Skencil http://skencil.org/ > Thuban http://thuban.intevation.org/ -- http://mail.python.org/mailman/listinfo/python-list