Message25355
Logged In: YES
user_id=4771
Adding a Py_EnterRecursiveCall() in PyObject_Call() seems to fix all the examples so far, with the exception of the "__get__=getattr" one, where we get a strange result instead of a RuntimeError (I suspect careless exception eating is taking place).
The main loop in ceval.c doesn't call PyObject_Call() very often: it usually dispatches directly itself for performance, which is exactly what we want here, as recursion from ceval.c is already protected by a Py_EnterRecursiveCall(). So this change has a minor impact on performance. Pystone for example issues only three PyObject_Call() per loop, to call classes. This has an almost-unmeasurable impact ( < 0.4%).
Of course I'll think a bit more and search for examples that don't go through PyObject_Call() :-) |
|
Date |
User |
Action |
Args |
2007-08-23 14:31:54 | admin | link | issue1202533 messages |
2007-08-23 14:31:54 | admin | create | |
|