[C++-sig] PyArg_ParseTuple

F.G.Testa testa at allos.sytes.net
Mon Nov 3 15:16:49 CET 2003


Consider the following snippet, do I have to free "device" before exiting?
Thank you!

PyObject* sdk_MonitorDevice(PyObject *self, PyObject * args)

{

char * device;

int size;

InvokeID_t invoke;

if (PyArg_ParseTuple(args, "s#",&device, &size))

{

    invoke = OAcs.sdk.MonitorDevice(device);


    return PyLong_FromUnsignedLong(invoke);

}

else

    return NULL;

}







More information about the Cplusplus-sig mailing list