Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index 5d086a7..f4a80c2 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -702,7 +702,9 @@
static PyObject *
mmap__exit__method(PyObject *self, PyObject *args)
{
- return PyObject_CallMethod(self, "close", NULL);
+ _Py_identifier(close);
+
+ return _PyObject_CallMethodId(self, &PyId_close, NULL);
}
static struct PyMethodDef mmap_object_methods[] = {