[Python-checkins] python/dist/src/Python ceval.c,2.324,2.325
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Fri, 16 Aug 2002 09:14:03 -0700
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv31581
Modified Files:
ceval.c
Log Message:
Streamline the fast track for CFunction calls a bit more: there was
nothing special done if keyword arguments were present, so test for
that earlier and fall through to the normal case if there are any.
This ought to slow down CFunction calls with keyword args, but I don't
care; it's a tiny (1%) improvement for pystone.
Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.324
retrieving revision 2.325
diff -C2 -d -r2.324 -r2.325
*** ceval.c 15 Aug 2002 14:59:02 -0000 2.324
--- ceval.c 16 Aug 2002 16:14:00 -0000 2.325
***************
*** 1976,1985 ****
callable object.
*/
! if (PyCFunction_Check(func)) {
int flags = PyCFunction_GET_FLAGS(func);
! if (nk != 0 || (flags & METH_KEYWORDS))
! x = do_call(func, &stack_pointer,
! na, nk);
! else if (flags == METH_VARARGS) {
PyObject *callargs;
callargs = load_args(&stack_pointer, na);
--- 1976,1982 ----
callable object.
*/
! if (PyCFunction_Check(func) && nk == 0) {
int flags = PyCFunction_GET_FLAGS(func);
! if (flags & (METH_VARARGS | METH_KEYWORDS)) {
PyObject *callargs;
callargs = load_args(&stack_pointer, na);