mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-135755: Move PyFunction_GET_BUILTINS
to the private API (GH-135938)
This commit is contained in:
parent
a1da208eec
commit
10a3d43188
4 changed files with 9 additions and 8 deletions
|
@ -97,11 +97,6 @@ static inline PyObject* PyFunction_GET_GLOBALS(PyObject *func) {
|
|||
}
|
||||
#define PyFunction_GET_GLOBALS(func) PyFunction_GET_GLOBALS(_PyObject_CAST(func))
|
||||
|
||||
static inline PyObject* PyFunction_GET_BUILTINS(PyObject *func) {
|
||||
return _PyFunction_CAST(func)->func_builtins;
|
||||
}
|
||||
#define PyFunction_GET_BUILTINS(func) PyFunction_GET_BUILTINS(_PyObject_CAST(func))
|
||||
|
||||
static inline PyObject* PyFunction_GET_MODULE(PyObject *func) {
|
||||
return _PyFunction_CAST(func)->func_module;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,11 @@ extern PyObject *_Py_set_function_type_params(
|
|||
PyAPI_FUNC(int)
|
||||
_PyFunction_VerifyStateless(PyThreadState *, PyObject *);
|
||||
|
||||
static inline PyObject* _PyFunction_GET_BUILTINS(PyObject *func) {
|
||||
return _PyFunction_CAST(func)->func_builtins;
|
||||
}
|
||||
#define _PyFunction_GET_BUILTINS(func) _PyFunction_GET_BUILTINS(_PyObject_CAST(func))
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue