summaryrefslogtreecommitdiffstats
path: root/Objects/fileobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r--Objects/fileobject.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 7e40547..259a423 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -1884,7 +1884,7 @@ file_init(PyObject *self, PyObject *args, PyObject *kwds)
{
PyFileObject *foself = (PyFileObject *)self;
int ret = 0;
- static char *kwlist[] = {"name", "mode", "buffering", 0};
+ static const char *kwlist[] = {"name", "mode", "buffering", 0};
char *name = NULL;
char *mode = "r";
int bufsize = -1;
@@ -1926,8 +1926,9 @@ file_init(PyObject *self, PyObject *args, PyObject *kwds)
return -1;
/* We parse again to get the name as a PyObject */
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|si:file", kwlist,
- &o_name, &mode, &bufsize))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|si:file",
+ kwlist, &o_name, &mode,
+ &bufsize))
return -1;
if (fill_file_fields(foself, NULL, o_name, mode,