[Python-Dev] [ Patch #101238 ] PyOS_CheckStack for Windows
Fredrik Lundh
Fredrik Lundh" <effbot@telia.com
Sun, 20 Aug 2000 16:34:31 +0200
I've prepared a patch based on the PyOS_CheckStack code
I posted earlier:
http://sourceforge.net/patch/index.php?func=detailpatch&patch_id=101238&group_id=5470
among other things, this fixes the recursive __repr__/__str__
problems under Windows. it also makes it easier to use Python
with non-standard stack sizes (e.g. when embedding).
some additional notes:
- the new function was added to pythonrun.c, mostly because
it was already declared in pythonrun.h...
- for the moment, it's only enabled if you're using MSVC. if any-
one here knows if structured exceptions are widely supported by
Windows compilers, let me know.
- it would probably be a good idea to make it an __inline function
(and put the entire function in the header file instead), but I don't
recall if MSVC does the right thing in that case, and I haven't had
time to try it out just yet...
enjoy /F