mirror of
https://github.com/python/cpython.git
synced 2025-07-19 09:15:34 +00:00
gh-74929: PEP 667 C API documentation (gh-119379)
* Add docs for new APIs * Add soft-deprecation notices * Add What's New porting entries * Update comments referencing `PyFrame_LocalsToFast()` to mention the proxy instead * Other related cleanups found when looking for refs to the deprecated APIs
This commit is contained in:
parent
cc5cd4d93e
commit
3859e09e3d
9 changed files with 104 additions and 11 deletions
|
@ -1570,7 +1570,7 @@ dummy_func(
|
|||
|
||||
inst(MAKE_CELL, (--)) {
|
||||
// "initial" is probably NULL but not if it's an arg (or set
|
||||
// via PyFrame_LocalsToFast() before MAKE_CELL has run).
|
||||
// via the f_locals proxy before MAKE_CELL has run).
|
||||
PyObject *initial = GETLOCAL(oparg);
|
||||
PyObject *cell = PyCell_New(initial);
|
||||
if (cell == NULL) {
|
||||
|
|
2
Python/executor_cases.c.h
generated
2
Python/executor_cases.c.h
generated
|
@ -1541,7 +1541,7 @@
|
|||
case _MAKE_CELL: {
|
||||
oparg = CURRENT_OPARG();
|
||||
// "initial" is probably NULL but not if it's an arg (or set
|
||||
// via PyFrame_LocalsToFast() before MAKE_CELL has run).
|
||||
// via the f_locals proxy before MAKE_CELL has run).
|
||||
PyObject *initial = GETLOCAL(oparg);
|
||||
PyObject *cell = PyCell_New(initial);
|
||||
if (cell == NULL) {
|
||||
|
|
2
Python/generated_cases.c.h
generated
2
Python/generated_cases.c.h
generated
|
@ -4784,7 +4784,7 @@
|
|||
next_instr += 1;
|
||||
INSTRUCTION_STATS(MAKE_CELL);
|
||||
// "initial" is probably NULL but not if it's an arg (or set
|
||||
// via PyFrame_LocalsToFast() before MAKE_CELL has run).
|
||||
// via the f_locals proxy before MAKE_CELL has run).
|
||||
PyObject *initial = GETLOCAL(oparg);
|
||||
PyObject *cell = PyCell_New(initial);
|
||||
if (cell == NULL) {
|
||||
|
|
|
@ -35,7 +35,6 @@ Data members:
|
|||
#include "pycore_sysmodule.h" // export _PySys_GetSizeOf()
|
||||
#include "pycore_tuple.h" // _PyTuple_FromArray()
|
||||
|
||||
#include "frameobject.h" // PyFrame_FastToLocalsWithError()
|
||||
#include "pydtrace.h" // PyDTrace_AUDIT()
|
||||
#include "osdefs.h" // DELIM
|
||||
#include "stdlib_module_names.h" // _Py_stdlib_module_names
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue