The question in source code about of funciton--PyObject_CallFunction (in file abstract.c)
yy x
flingfly at gmail.com
Sun Jan 22 22:24:35 EST 2006
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;
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;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060123/3e5be5fc/attachment.html>
More information about the Python-list
mailing list