From: Dong-hee Na Date: Wed, 16 Feb 2022 16:04:38 +0000 (+0900) Subject: bpo-46541: Remove usage of _Py_IDENTIFIER from mmap module (GH-31375) X-Git-Tag: v3.11.0a6~188 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e8a19b092fc0551581e10d6f310dd5feabac7609;p=thirdparty%2FPython%2Fcpython.git bpo-46541: Remove usage of _Py_IDENTIFIER from mmap module (GH-31375) --- diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index 0a216941d024..26cedf1b9006 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -21,7 +21,6 @@ #ifndef Py_BUILD_CORE_BUILTIN # define Py_BUILD_CORE_MODULE 1 #endif -#define NEEDS_PY_IDENTIFIER #define PY_SSIZE_T_CLEAN #include @@ -771,9 +770,7 @@ mmap__enter__method(mmap_object *self, PyObject *args) static PyObject * mmap__exit__method(PyObject *self, PyObject *args) { - _Py_IDENTIFIER(close); - - return _PyObject_CallMethodIdNoArgs(self, &PyId_close); + return mmap_close_method((mmap_object *)self, NULL); } static PyObject *