From: Armin R. <ar...@us...> - 2002-03-24 14:24:44
|
Update of /cvsroot/psyco/psyco/c/Objects In directory usw-pr-cvs1:/tmp/cvs-serv18930/c/Objects Modified Files: pfuncobject.c Log Message: sys._getframe() support Index: pfuncobject.c =================================================================== RCS file: /cvsroot/psyco/psyco/c/Objects/pfuncobject.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** pfuncobject.c 18 Mar 2002 19:04:22 -0000 1.9 --- pfuncobject.c 24 Mar 2002 14:24:39 -0000 1.10 *************** *** 95,98 **** --- 95,100 ---- co = (PyCodeObject*) PyFunction_GET_CODE(f); + if (PyCode_GetNumFree(co) > 0) + goto fallback; glob = PyFunction_GET_GLOBALS(f); defl = PyFunction_GET_DEFAULTS(f); *************** *** 136,151 **** } } ! else { #if NEW_STYLE_TYPES /* Python >= 2.2b1 */ ! return psyco_generic_call(po, PyFunction_Type.tp_call, ! CfReturnRef|CfPyErrIfNull, ! "vvv", func, arg, kw); #else ! /* PyFunction_Type.tp_call == NULL... */ ! return psyco_generic_call(po, PyEval_CallObjectWithKeywords, ! CfReturnRef|CfPyErrIfNull, ! "vvv", func, arg, kw); #endif - } } --- 138,153 ---- } } ! ! fallback: #if NEW_STYLE_TYPES /* Python >= 2.2b1 */ ! return psyco_generic_call(po, PyFunction_Type.tp_call, ! CfReturnRef|CfPyErrIfNull, ! "vvv", func, arg, kw); #else ! /* PyFunction_Type.tp_call == NULL... */ ! return psyco_generic_call(po, PyEval_CallObjectWithKeywords, ! CfReturnRef|CfPyErrIfNull, ! "vvv", func, arg, kw); #endif } |