Skip to content

Commit e8a19b0

Browse files
authored
bpo-46541: Remove usage of _Py_IDENTIFIER from mmap module (GH-31375)
1 parent b207711 commit e8a19b0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Modules/mmapmodule.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#ifndef Py_BUILD_CORE_BUILTIN
2222
# define Py_BUILD_CORE_MODULE 1
2323
#endif
24-
#define NEEDS_PY_IDENTIFIER
2524

2625
#define PY_SSIZE_T_CLEAN
2726
#include <Python.h>
@@ -771,9 +770,7 @@ mmap__enter__method(mmap_object *self, PyObject *args)
771770
static PyObject *
772771
mmap__exit__method(PyObject *self, PyObject *args)
773772
{
774-
_Py_IDENTIFIER(close);
775-
776-
return _PyObject_CallMethodIdNoArgs(self, &PyId_close);
773+
return mmap_close_method((mmap_object *)self, NULL);
777774
}
778775

779776
static PyObject *

0 commit comments

Comments
 (0)