]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
PyFile_WriteObject(): some of the local variables are only used when
authorFred Drake <fdrake@acm.org>
Fri, 19 Mar 2004 15:22:36 +0000 (15:22 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 19 Mar 2004 15:22:36 +0000 (15:22 +0000)
                       Py_USING_UNICODE is defined

Objects/fileobject.c

index 05c9f4a9b257bc0d68f2daef32475eaf23eb7c61..1e8be6a393013e19a27e382176805ae6ba8f66a8 100644 (file)
@@ -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;