Exceptions.c: use PyCode_NewEmpty() in Py3 instead of PyCode_New() (GH-4479)
With reference to https://github.com/cython/cython/issues/4365#issuecomment-977023011 in Python 3 PyCode_NewEmpty does everything we need to set exception traceback code objects. This change is probably only a real improvement on Py3.11 onwards (where the replacement for PyCode_new is currently pretty slow). On earlier version it'll probably be fairly similar (maybe one extra allocation for the cline case?)
Showing
Please register or sign in to comment