summaryrefslogtreecommitdiffstats
path: root/Modules/clinic
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-04-29 12:44:16 (GMT)
committerGitHub <noreply@github.com>2018-04-29 12:44:16 (GMT)
commit1b27ec6e0b40f81bf276eefa6b5bdb773b2a8890 (patch)
treeadd179856cac02d9d9d859cec611dd1b2574658c /Modules/clinic
parent4533494ac553273239c809053b54c0ab783a0c78 (diff)
downloadcpython-1b27ec6e0b40f81bf276eefa6b5bdb773b2a8890.zip
cpython-1b27ec6e0b40f81bf276eefa6b5bdb773b2a8890.tar.gz
cpython-1b27ec6e0b40f81bf276eefa6b5bdb773b2a8890.tar.bz2
[3.6] bpo-33383: Fix crash in get() of the dbm.ndbm database object. (GH-6630). (GH-6633)
(cherry picked from commit 2e38cc39330bd7f3003652869b644110a97a78d8)
Diffstat (limited to 'Modules/clinic')
-rw-r--r--Modules/clinic/_dbmmodule.c.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/clinic/_dbmmodule.c.h b/Modules/clinic/_dbmmodule.c.h
index 7dd529a..9a35311 100644
--- a/Modules/clinic/_dbmmodule.c.h
+++ b/Modules/clinic/_dbmmodule.c.h
@@ -39,7 +39,7 @@ _dbm_dbm_keys(dbmobject *self, PyObject *Py_UNUSED(ignored))
}
PyDoc_STRVAR(_dbm_dbm_get__doc__,
-"get($self, key, default=b\'\', /)\n"
+"get($self, key, default=None, /)\n"
"--\n"
"\n"
"Return the value for key if present, otherwise default.");
@@ -57,7 +57,7 @@ _dbm_dbm_get(dbmobject *self, PyObject *args)
PyObject *return_value = NULL;
const char *key;
Py_ssize_clean_t key_length;
- PyObject *default_value = NULL;
+ PyObject *default_value = Py_None;
if (!PyArg_ParseTuple(args, "s#|O:get",
&key, &key_length, &default_value)) {
@@ -141,4 +141,4 @@ dbmopen(PyObject *module, PyObject *args)
exit:
return return_value;
}
-/*[clinic end generated code: output=001fabffcecb99f1 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=919cc4337be4a5d3 input=a9049054013a1b77]*/