summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/_gdbmmodule.c.h
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-02-26 14:02:22 (GMT)
committerGitHub <noreply@github.com>2018-02-26 14:02:22 (GMT)
commit6f600ff1734ca2fdcdd37a809adf8130f0d8cc4e (patch)
tree3dc8ecabed25ffe13d7e79630a9eea9c3c8f3177 /Modules/clinic/_gdbmmodule.c.h
parent973cae07d6ce7f5a93bd9cd3bcb724a96cfe14e9 (diff)
downloadcpython-6f600ff1734ca2fdcdd37a809adf8130f0d8cc4e.zip
cpython-6f600ff1734ca2fdcdd37a809adf8130f0d8cc4e.tar.gz
cpython-6f600ff1734ca2fdcdd37a809adf8130f0d8cc4e.tar.bz2
bpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832)
Diffstat (limited to 'Modules/clinic/_gdbmmodule.c.h')
-rw-r--r--Modules/clinic/_gdbmmodule.c.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/Modules/clinic/_gdbmmodule.c.h b/Modules/clinic/_gdbmmodule.c.h
index 2222967..7bdc432 100644
--- a/Modules/clinic/_gdbmmodule.c.h
+++ b/Modules/clinic/_gdbmmodule.c.h
@@ -234,23 +234,24 @@ PyDoc_STRVAR(dbmopen__doc__,
{"open", (PyCFunction)dbmopen, METH_FASTCALL, dbmopen__doc__},
static PyObject *
-dbmopen_impl(PyObject *module, const char *name, const char *flags, int mode);
+dbmopen_impl(PyObject *module, PyObject *filename, const char *flags,
+ int mode);
static PyObject *
dbmopen(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
- const char *name;
+ PyObject *filename;
const char *flags = "r";
int mode = 438;
- if (!_PyArg_ParseStack(args, nargs, "s|si:open",
- &name, &flags, &mode)) {
+ if (!_PyArg_ParseStack(args, nargs, "U|si:open",
+ &filename, &flags, &mode)) {
goto exit;
}
- return_value = dbmopen_impl(module, name, flags, mode);
+ return_value = dbmopen_impl(module, filename, flags, mode);
exit:
return return_value;
}
-/*[clinic end generated code: output=dc0aca8c00055d02 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=dec05ff9c5aeaeae input=a9049054013a1b77]*/