]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46541: Remove usage of _Py_IDENTIFIER from mmap module (GH-31375)
authorDong-hee Na <donghee.na@python.org>
Wed, 16 Feb 2022 16:04:38 +0000 (01:04 +0900)
committerGitHub <noreply@github.com>
Wed, 16 Feb 2022 16:04:38 +0000 (01:04 +0900)
Modules/mmapmodule.c

index 0a216941d0248718340e439e587329dcd4931985..26cedf1b9006d8b67f97f7507ddb4998c3f58796 100644 (file)
@@ -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 <Python.h>
@@ -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 *