summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-12-06 00:20:00 +0100
committerChristian Heimes <christian@cheimes.de>2013-12-06 00:20:00 +0100
commit8ff6f3e895066ebf9f97106248fc0013be6b23ab (patch)
treeac8fd2d2cad9a93731c1462a6fc94e27d55d44da
parent710280b6d63fe7a1d6eef564b4fce7681209ec20 (diff)
downloadcpython-git-8ff6f3e895066ebf9f97106248fc0013be6b23ab.tar.gz
Issue #19296: Silence compiler warning in dbm_open.
Some dbm header files declare the first argument as char * instead of a const char *.
-rw-r--r--Misc/NEWS2
-rw-r--r--Modules/_dbmmodule.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 1522379dc6..90e0dce393 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -18,6 +18,8 @@ Core and Builtins
Library
-------
+- Issue #19296: Silence compiler warning in dbm_open
+
- Issue #19839: Fix regression in bz2 module's handling of non-bzip2 data at
EOF, and analogous bug in lzma module.
diff --git a/Modules/_dbmmodule.c b/Modules/_dbmmodule.c
index 10f8fb939e..f9a0e5e706 100644
--- a/Modules/_dbmmodule.c
+++ b/Modules/_dbmmodule.c
@@ -66,7 +66,8 @@ newdbmobject(const char *file, int flags, int mode)
if (dp == NULL)
return NULL;
dp->di_size = -1;
- if ( (dp->di_dbm = dbm_open(file, flags, mode)) == 0 ) {
+ /* See issue #19296 */
+ if ( (dp->di_dbm = dbm_open((char *)file, flags, mode)) == 0 ) {
PyErr_SetFromErrno(DbmError);
Py_DECREF(dp);
return NULL;