GeezerVison is showing github.com — [3.14] gh-135755: Move SPECIAL_ constants to a private header (GH-135… · python/cpython@a345fed
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: Include/ceval.h -7Lines changed: 0 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -133,13 +133,6 @@ PyAPI_FUNC(void) PyEval_ReleaseThread(PyThreadState *tstate); |
133 | 133 | #define FVS_MASK 0x4 |
134 | 134 | #define FVS_HAVE_SPEC 0x4 |
135 | 135 |
|
136 | | -/* Special methods used by LOAD_SPECIAL */ |
137 | | -#define SPECIAL___ENTER__ 0 |
138 | | -#define SPECIAL___EXIT__ 1 |
139 | | -#define SPECIAL___AENTER__ 2 |
140 | | -#define SPECIAL___AEXIT__ 3 |
141 | | -#define SPECIAL_MAX 3 |
142 | | - |
143 | 136 | #ifndef Py_LIMITED_API |
144 | 137 | # define Py_CPYTHON_CEVAL_H |
145 | 138 | # include "cpython/ceval.h" |
|
Collapse file
Copy file name to clipboardExpand all lines: Include/internal/pycore_ceval.h +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -363,6 +363,13 @@ PyAPI_FUNC(_PyStackRef) _PyFloat_FromDouble_ConsumeInputs(_PyStackRef left, _PyS |
363 | 363 | extern int _PyRunRemoteDebugger(PyThreadState *tstate); |
364 | 364 | #endif |
365 | 365 |
|
| 366 | +/* Special methods used by LOAD_SPECIAL */ |
| 367 | +#define SPECIAL___ENTER__ 0 |
| 368 | +#define SPECIAL___EXIT__ 1 |
| 369 | +#define SPECIAL___AENTER__ 2 |
| 370 | +#define SPECIAL___AEXIT__ 3 |
| 371 | +#define SPECIAL_MAX 3 |
| 372 | + |
366 | 373 | #ifdef __cplusplus |
367 | 374 | } |
368 | 375 | #endif |
|
Collapse file
Copy file name to clipboardExpand all lines: Modules/_opcode.c +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
5 | 5 | #include "Python.h" |
6 | 6 | #include "compile.h" |
7 | 7 | #include "opcode.h" |
8 | | -#include "pycore_ceval.h" |
| 8 | +#include "pycore_ceval.h" // SPECIAL_MAX |
9 | 9 | #include "pycore_code.h" |
10 | 10 | #include "pycore_compile.h" |
11 | 11 | #include "pycore_intrinsics.h" |
|
Collapse file
Copy file name to clipboardExpand all lines: Python/ceval.c +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
8 | 8 | #include "pycore_backoff.h" |
9 | 9 | #include "pycore_call.h" // _PyObject_CallNoArgs() |
10 | 10 | #include "pycore_cell.h" // PyCell_GetRef() |
11 | | -#include "pycore_ceval.h" |
| 11 | +#include "pycore_ceval.h" // SPECIAL___ENTER__ |
12 | 12 | #include "pycore_code.h" |
13 | 13 | #include "pycore_dict.h" |
14 | 14 | #include "pycore_emscripten_signal.h" // _Py_CHECK_EMSCRIPTEN_SIGNALS |
|
Collapse file
Copy file name to clipboardExpand all lines: Python/codegen.c +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
28 | 28 | #include "pycore_pystate.h" // _Py_GetConfig() |
29 | 29 | #include "pycore_symtable.h" // PySTEntryObject |
30 | 30 | #include "pycore_unicodeobject.h" // _PyUnicode_EqualToASCIIString |
| 31 | +#include "pycore_ceval.h" // SPECIAL___ENTER__ |
31 | 32 |
|
32 | 33 | #define NEED_OPCODE_METADATA |
33 | 34 | #include "pycore_opcode_metadata.h" // _PyOpcode_opcode_metadata, _PyOpcode_num_popped/pushed |
|