Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-46541: Remove usage of _Py_IDENTIFIER from dbms modules #31358

Merged
merged 3 commits into from
Feb 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Modules/_dbmmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


#define PY_SSIZE_T_CLEAN
#define NEEDS_PY_IDENTIFIER
#include "Python.h"

#include <sys/types.h>
Expand Down Expand Up @@ -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[] = {
Expand Down
4 changes: 1 addition & 3 deletions Modules/_gdbmmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/* Doc strings: Mitch Chapman */

#define PY_SSIZE_T_CLEAN
#define NEEDS_PY_IDENTIFIER
#include "Python.h"
#include "gdbm.h"

Expand Down Expand Up @@ -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[] = {
Expand Down