[Python-checkins] python/dist/src/Include ceval.h,2.49,2.50
arigo at users.sourceforge.net
arigo at users.sourceforge.net
Tue Oct 28 07:05:49 EST 2003
- Previous message: [Python-checkins] python/nondist/peps pep-0000.txt, 1.255,
1.256 pep-0322.txt, 1.5, 1.6
- Next message: [Python-checkins] python/dist/src/Lib/test pickletester.py, 1.55,
1.56 test_builtin.py, 1.23, 1.24 test_copy.py, 1.11,
1.12 test_richcmp.py, 1.9, 1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv30659/Include
Modified Files:
ceval.h
Log Message:
Deleting cyclic object comparison.
SF patch 825639
http://mail.python.org/pipermail/python-dev/2003-October/039445.html
Index: ceval.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/ceval.h,v
retrieving revision 2.49
retrieving revision 2.50
diff -C2 -d -r2.49 -r2.50
*** ceval.h 20 Feb 2003 17:59:17 -0000 2.49
--- ceval.h 28 Oct 2003 12:05:46 -0000 2.50
***************
*** 44,49 ****
--- 44,63 ----
PyAPI_FUNC(int) Py_MakePendingCalls(void);
+ /* Protection against deeply nested recursive calls */
PyAPI_FUNC(void) Py_SetRecursionLimit(int);
PyAPI_FUNC(int) Py_GetRecursionLimit(void);
+
+ #define Py_EnterRecursiveCall(where) \
+ (_Py_MakeRecCheck(PyThreadState_GET()->recursion_depth) && \
+ _Py_CheckRecursiveCall(where))
+ #define Py_LeaveRecursiveCall() \
+ (--PyThreadState_GET()->recursion_depth)
+ PyAPI_FUNC(int) _Py_CheckRecursiveCall(char *where);
+ PyAPI_DATA(int) _Py_CheckRecursionLimit;
+ #ifdef USE_STACKCHECK
+ # define _Py_MakeRecCheck(x) (++(x) > --_Py_CheckRecursionLimit)
+ #else
+ # define _Py_MakeRecCheck(x) (++(x) > _Py_CheckRecursionLimit)
+ #endif
PyAPI_FUNC(char *) PyEval_GetFuncName(PyObject *);
- Previous message: [Python-checkins] python/nondist/peps pep-0000.txt, 1.255,
1.256 pep-0322.txt, 1.5, 1.6
- Next message: [Python-checkins] python/dist/src/Lib/test pickletester.py, 1.55,
1.56 test_builtin.py, 1.23, 1.24 test_copy.py, 1.11,
1.12 test_richcmp.py, 1.9, 1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-checkins
mailing list