diff options
author | Dong-hee Na <donghee.na@python.org> | 2022-02-16 09:57:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-16 09:57:28 (GMT) |
commit | e59309b9d0969d5c8f493cb8df28afa6f38d6273 (patch) | |
tree | 6c174f15e48c3499695dc19827705c62cf7af0cc | |
parent | 0cb765b2cec9b020224af016a83bf35c45b71932 (diff) | |
download | cpython-e59309b9d0969d5c8f493cb8df28afa6f38d6273.zip cpython-e59309b9d0969d5c8f493cb8df28afa6f38d6273.tar.gz cpython-e59309b9d0969d5c8f493cb8df28afa6f38d6273.tar.bz2 |
bpo-46541: Remove usage of _Py_IDENTIFIER from dbms modules (GH-31358)
-rw-r--r-- | Modules/_dbmmodule.c | 4 | ||||
-rw-r--r-- | Modules/_gdbmmodule.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/Modules/_dbmmodule.c b/Modules/_dbmmodule.c index 65778fa..de8b230 100644 --- a/Modules/_dbmmodule.c +++ b/Modules/_dbmmodule.c @@ -3,7 +3,6 @@ #define PY_SSIZE_T_CLEAN -#define NEEDS_PY_IDENTIFIER #include "Python.h" #include <sys/types.h> @@ -396,8 +395,7 @@ dbm__enter__(PyObject *self, PyObject *args) static PyObject * dbm__exit__(PyObject *self, PyObject *args) { - _Py_IDENTIFIER(close); - return _PyObject_CallMethodIdNoArgs(self, &PyId_close); + return _dbm_dbm_close_impl((dbmobject *)self); } static PyMethodDef dbm_methods[] = { diff --git a/Modules/_gdbmmodule.c b/Modules/_gdbmmodule.c index 2d690c0..e6440fa 100644 --- a/Modules/_gdbmmodule.c +++ b/Modules/_gdbmmodule.c @@ -4,7 +4,6 @@ /* Doc strings: Mitch Chapman */ #define PY_SSIZE_T_CLEAN -#define NEEDS_PY_IDENTIFIER #include "Python.h" #include "gdbm.h" @@ -545,8 +544,7 @@ gdbm__enter__(PyObject *self, PyObject *args) static PyObject * gdbm__exit__(PyObject *self, PyObject *args) { - _Py_IDENTIFIER(close); - return _PyObject_CallMethodIdNoArgs(self, &PyId_close); + return _gdbm_gdbm_close_impl((gdbmobject *)self); } static PyMethodDef gdbm_methods[] = { |