mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-88116: Document that PyCodeNew is dangerous, and make PyCode_NewEmpty less dangerous. (GH-91790)
This commit is contained in:
parent
5974827c71
commit
d44815cabc
4 changed files with 39 additions and 7 deletions
|
@ -1159,6 +1159,12 @@ C API Changes
|
|||
as its second parameter, instead of ``PyFrameObject*``.
|
||||
See :pep:`523` for more details of how to use this function pointer type.
|
||||
|
||||
* :c:func:`PyCode_New` and :c:func:`PyCode_NewWithPosOnlyArgs` now take
|
||||
an additional ``exception_table`` argument.
|
||||
Using these functions should be avoided, if at all possible.
|
||||
To get a custom code object: create a code object using the compiler,
|
||||
then get a modified version with the ``replace`` method.
|
||||
|
||||
New Features
|
||||
------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue