mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-92154: Expose PyCode_GetCode in the C API (GH-92168)
This commit is contained in:
parent
1d4a9a45b7
commit
6c7249f265
6 changed files with 53 additions and 0 deletions
|
@ -1412,6 +1412,11 @@ C API Changes
|
|||
To get a custom code object: create a code object using the compiler,
|
||||
then get a modified version with the ``replace`` method.
|
||||
|
||||
* :c:type:`PyCodeObject` no longer has a ``co_code`` field. Instead,
|
||||
use ``PyObject_GetAttrString(code_object, "co_code")`` or
|
||||
:c:func:`PyCode_GetCode` to get the underlying bytes object.
|
||||
(Contributed by Brandt Bucher in :issue:`46841` and Ken Jin in :gh:`92154`.)
|
||||
|
||||
New Features
|
||||
------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue