[Python-Dev] USE_STACKCHECK/PyOS_CheckStack

Barry Scott barry@scottb.demon.co.uk
Thu, 6 Jul 2000 20:58:22 +0100


> The effectiveness of this is dependent on guessing a good value (per
> platform) for MAX_RECURSION_DEPTH (and it's broken under Windows in 1.5.2).

For embedding Python into other apps you need to control the value of
MAX_RECURSION_DEPTH at run time.

I can then adjust the value to:
* take account of my app's impact on the stack usage
* limit the depth to get a faster failure from buggy .py modules
* work around any bug that gets the value wrong

Having a pair of functions to Set/Get the value would be very nice.

		BArry