diff options
-rw-r--r-- | Objects/fileobject.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 05c9f4a..1e8be6a 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -2005,8 +2005,10 @@ PyFile_WriteObject(PyObject *v, PyObject *f, int flags) } else if (PyFile_Check(f)) { FILE *fp = PyFile_AsFile(f); +#ifdef Py_USING_UNICODE PyObject *enc = ((PyFileObject*)f)->f_encoding; int result; +#endif if (fp == NULL) { err_closed(); return -1; |