diff options
Diffstat (limited to 'Modules/_operator.c')
-rw-r--r-- | Modules/_operator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_operator.c b/Modules/_operator.c index b3a8bef2eae..10adabcbf0e 100644 --- a/Modules/_operator.c +++ b/Modules/_operator.c @@ -1,5 +1,6 @@ #include "Python.h" #include "pycore_moduleobject.h" // _PyModule_GetState() +#include "pycore_runtime.h" // _Py_ID() #include "clinic/_operator.c.h" typedef struct { @@ -1693,11 +1694,10 @@ methodcaller_reduce(methodcallerobject *mc, PyObject *Py_UNUSED(ignored)) PyObject *constructor; PyObject *newargs[2]; - _Py_IDENTIFIER(partial); functools = PyImport_ImportModule("functools"); if (!functools) return NULL; - partial = _PyObject_GetAttrId(functools, &PyId_partial); + partial = PyObject_GetAttr(functools, &_Py_ID(partial)); Py_DECREF(functools); if (!partial) return NULL; |