mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Issue #19296: Silence compiler warning in dbm_open.
Some dbm header files declare the first argument as char * instead of a const char *.
This commit is contained in:
parent
710280b6d6
commit
8ff6f3e895
2 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue