diff options
author | Ken Jin <kenjin4096@gmail.com> | 2022-05-03 13:13:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 13:13:13 (GMT) |
commit | 6c7249f2655749a06b4674a17537f844bd54d217 (patch) | |
tree | 15c7131fdf51411d2e8e566347f75e9f0809f508 /Doc/whatsnew | |
parent | 1d4a9a45b7ac8c1c5fecc363c988be59500f1ed7 (diff) | |
download | cpython-6c7249f2655749a06b4674a17537f844bd54d217.zip cpython-6c7249f2655749a06b4674a17537f844bd54d217.tar.gz cpython-6c7249f2655749a06b4674a17537f844bd54d217.tar.bz2 |
gh-92154: Expose PyCode_GetCode in the C API (GH-92168)
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.11.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 607f2e7..c19f158 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -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 ------------ |