From: Armin R. <ar...@us...> - 2002-02-08 11:18:37
|
Update of /cvsroot/psyco/psyco/c/Python In directory usw-pr-cvs1:/tmp/cvs-serv14985/c/Python Modified Files: pycompiler.c Log Message: minor fixes and more testing support Index: pycompiler.c =================================================================== RCS file: /cvsroot/psyco/psyco/c/Python/pycompiler.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** pycompiler.c 6 Feb 2002 11:53:53 -0000 1.11 --- pycompiler.c 8 Feb 2002 11:18:34 -0000 1.12 *************** *** 834,837 **** --- 834,845 ---- return result; } + else if (strcmp(PyString_AS_STRING(key), "__in_psyco__") == 0) { + /* special-case __in_psyco__ to always return 1, although + its value in the builtins is always 0. This variable + can be used by a function to know that it is compiled + by Psyco. */ + result = Py_True; + Py_INCREF(result); + } else { /* no such global variable, get the builtins */ |