Skip to content

Commit c8181cc

Browse files
Add PyFunction_GET_BUILTINS().
1 parent aaa98ac commit c8181cc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Include/cpython/funcobject.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ static inline PyObject* PyFunction_GET_GLOBALS(PyObject *func) {
9797
}
9898
#define PyFunction_GET_GLOBALS(func) PyFunction_GET_GLOBALS(_PyObject_CAST(func))
9999

100+
static inline PyObject* PyFunction_GET_BUILTINS(PyObject *func) {
101+
return _PyFunction_CAST(func)->func_builtins;
102+
}
103+
#define PyFunction_GET_BUILTINS(func) PyFunction_GET_BUILTINS(_PyObject_CAST(func))
104+
100105
static inline PyObject* PyFunction_GET_MODULE(PyObject *func) {
101106
return _PyFunction_CAST(func)->func_module;
102107
}

0 commit comments

Comments
 (0)