On 19/01/2021 3:40 pm, Antoine Pitrou wrote:
On 2021年1月19日 13:31:45 +0000 Mark Shannon <[email protected]> wrote:Hi everyone, It's time for yet another PEP :) Fortunately, this one is a small one that doesn't change much. It's aim is to make the VM more robust.On the principle, no objection. In practice, can you show how an implementation of Py_CheckStackDepth() would look like?
It would depend on the platform, but a portable-ish implementation is here: https://github.com/markshannon/cpython/blob/pep-overflow-implementation/Include/internal/pycore_ceval.h#L71
Also, what is the `headroom` argument in Py_CheckStackDepthWithHeadroom() supposed to represent? Bytes? Stack frames?
Bytes. I'll update the PEP.
Regards Antoine. _______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/XG6IU6A7ZGXVMF2TXZXOZ32SIKMAHB5X/ Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/G5HQG6NMIU3XSI5TMPDBMHM623WY2YPV/ Code of Conduct: http://python.org/psf/codeofconduct/