mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
gh-101101: Unstable C API tier (PEP 689) (GH-101102)
This commit is contained in:
parent
c41af812c9
commit
6b2d7c0ddb
18 changed files with 358 additions and 29 deletions
|
@ -567,7 +567,8 @@ _PyCode_New(struct _PyCodeConstructor *con)
|
|||
******************/
|
||||
|
||||
PyCodeObject *
|
||||
PyCode_NewWithPosOnlyArgs(int argcount, int posonlyargcount, int kwonlyargcount,
|
||||
PyUnstable_Code_NewWithPosOnlyArgs(
|
||||
int argcount, int posonlyargcount, int kwonlyargcount,
|
||||
int nlocals, int stacksize, int flags,
|
||||
PyObject *code, PyObject *consts, PyObject *names,
|
||||
PyObject *varnames, PyObject *freevars, PyObject *cellvars,
|
||||
|
@ -691,7 +692,7 @@ error:
|
|||
}
|
||||
|
||||
PyCodeObject *
|
||||
PyCode_New(int argcount, int kwonlyargcount,
|
||||
PyUnstable_Code_New(int argcount, int kwonlyargcount,
|
||||
int nlocals, int stacksize, int flags,
|
||||
PyObject *code, PyObject *consts, PyObject *names,
|
||||
PyObject *varnames, PyObject *freevars, PyObject *cellvars,
|
||||
|
@ -1371,7 +1372,7 @@ typedef struct {
|
|||
|
||||
|
||||
int
|
||||
_PyCode_GetExtra(PyObject *code, Py_ssize_t index, void **extra)
|
||||
PyUnstable_Code_GetExtra(PyObject *code, Py_ssize_t index, void **extra)
|
||||
{
|
||||
if (!PyCode_Check(code)) {
|
||||
PyErr_BadInternalCall();
|
||||
|
@ -1392,7 +1393,7 @@ _PyCode_GetExtra(PyObject *code, Py_ssize_t index, void **extra)
|
|||
|
||||
|
||||
int
|
||||
_PyCode_SetExtra(PyObject *code, Py_ssize_t index, void *extra)
|
||||
PyUnstable_Code_SetExtra(PyObject *code, Py_ssize_t index, void *extra)
|
||||
{
|
||||
PyInterpreterState *interp = _PyInterpreterState_GET();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue