]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-120642: Move private PyCode APIs to the internal C API (#120643)
authorVictor Stinner <vstinner@python.org>
Wed, 26 Jun 2024 11:54:03 +0000 (13:54 +0200)
committerGitHub <noreply@github.com>
Wed, 26 Jun 2024 11:54:03 +0000 (13:54 +0200)
commit9e4a81f00fef689c6e18a64245aa064eaadc7ac7
treea0e7efaf59d8bb90911830b230909659b1176904
parent9e45fd9858a059950f7387b4fda2b00df0e8e537
gh-120642: Move private PyCode APIs to the internal C API (#120643)

* Move _Py_CODEUNIT and related functions to pycore_code.h.
* Move _Py_BackoffCounter to pycore_backoff.h.
* Move Include/cpython/optimizer.h content to pycore_optimizer.h.
* Remove Include/cpython/optimizer.h.
* Remove PyUnstable_Replace_Executor().

Rename functions:

* PyUnstable_GetExecutor() => _Py_GetExecutor()
* PyUnstable_GetOptimizer() => _Py_GetOptimizer()
* PyUnstable_SetOptimizer() => _Py_SetTier2Optimizer()
* PyUnstable_Optimizer_NewCounter() => _PyOptimizer_NewCounter()
* PyUnstable_Optimizer_NewUOpOptimizer() => _PyOptimizer_NewUOpOptimizer()
18 files changed:
Include/Python.h
Include/cpython/code.h
Include/cpython/optimizer.h [deleted file]
Include/internal/pycore_backoff.h
Include/internal/pycore_code.h
Include/internal/pycore_interp.h
Include/internal/pycore_optimizer.h
Makefile.pre.in
Misc/NEWS.d/next/C API/2024-06-19-21-27-42.gh-issue-120642.UlKClN.rst [new file with mode: 0644]
Misc/NEWS.d/next/C API/2024-06-26-11-29-01.gh-issue-120642.H7P9qK.rst [new file with mode: 0644]
Modules/_opcode.c
Modules/_testinternalcapi.c
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj.filters
Python/optimizer.c
Python/optimizer_analysis.c
Python/optimizer_symbols.c
Python/pylifecycle.c