hi,all.
I have remarked the statement of question with blue color in the following funcition, Counld someone answer me?
thanks
PyObject *
PyObject_CallFunction(PyObject *callable, char *format, ...)
{
va_list va;
PyObject *args, *retval;
PyObject_CallFunction(PyObject *callable, char *format, ...)
{
va_list va;
PyObject *args, *retval;
if (callable == NULL)
return null_error();
if (format && *format) {
va_start(va, format);
args = Py_VaBuildValue(format, va);
va_end(va);
}
else
args = PyTuple_New(0);
if (args == NULL)
return NULL;
if (!PyTuple_Check(args)) {
PyObject *a;
a = PyTuple_New(1);
if (a == NULL)
return NULL;
if (PyTuple_SetItem(a, 0, args) < 0)
return NULL;//if return from here, why not release the a and args??
args = a;
}
retval = PyObject_Call(callable, args, NULL);
Py_DECREF(args);
return retval;
}
-- http://mail.python.org/mailman/listinfo/python-list