summaryrefslogtreecommitdiffstats
path: root/Modules/clinic
diff options
context:
space:
mode:
authorHenry-Joseph Audéoud <h.audeoud@gmail.com>2021-09-10 12:26:16 (GMT)
committerGitHub <noreply@github.com>2021-09-10 12:26:16 (GMT)
commit707137b8637feef37b2e06a851fdca9d1b945861 (patch)
treeeedd9bec5c0b98b244438e120ee12d8143906c19 /Modules/clinic
parent62fa613f6a6e872723505ee9d56242c31a654a9d (diff)
downloadcpython-707137b8637feef37b2e06a851fdca9d1b945861.zip
cpython-707137b8637feef37b2e06a851fdca9d1b945861.tar.gz
cpython-707137b8637feef37b2e06a851fdca9d1b945861.tar.bz2
bpo-40563: Support pathlike objects on dbm/shelve (GH-21849)
Co-authored-by: Hakan Çelik <hakancelik96@outlook.com>
Diffstat (limited to 'Modules/clinic')
-rw-r--r--Modules/clinic/_dbmmodule.c.h9
-rw-r--r--Modules/clinic/_gdbmmodule.c.h9
2 files changed, 2 insertions, 16 deletions
diff --git a/Modules/clinic/_dbmmodule.c.h b/Modules/clinic/_dbmmodule.c.h
index b50db5d..f0b8220 100644
--- a/Modules/clinic/_dbmmodule.c.h
+++ b/Modules/clinic/_dbmmodule.c.h
@@ -149,13 +149,6 @@ dbmopen(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
if (!_PyArg_CheckPositional("open", nargs, 1, 3)) {
goto exit;
}
- if (!PyUnicode_Check(args[0])) {
- _PyArg_BadArgument("open", "argument 1", "str", args[0]);
- goto exit;
- }
- if (PyUnicode_READY(args[0]) == -1) {
- goto exit;
- }
filename = args[0];
if (nargs < 2) {
goto skip_optional;
@@ -186,4 +179,4 @@ skip_optional:
exit:
return return_value;
}
-/*[clinic end generated code: output=13b6d821416be228 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=32ef6c0f8f2d3db9 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_gdbmmodule.c.h b/Modules/clinic/_gdbmmodule.c.h
index 15baf52..a40e80d 100644
--- a/Modules/clinic/_gdbmmodule.c.h
+++ b/Modules/clinic/_gdbmmodule.c.h
@@ -303,13 +303,6 @@ dbmopen(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
if (!_PyArg_CheckPositional("open", nargs, 1, 3)) {
goto exit;
}
- if (!PyUnicode_Check(args[0])) {
- _PyArg_BadArgument("open", "argument 1", "str", args[0]);
- goto exit;
- }
- if (PyUnicode_READY(args[0]) == -1) {
- goto exit;
- }
filename = args[0];
if (nargs < 2) {
goto skip_optional;
@@ -340,4 +333,4 @@ skip_optional:
exit:
return return_value;
}
-/*[clinic end generated code: output=1fed9ed50ad23551 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=63c507f93d84a3a4 input=a9049054013a1b77]*/