]> 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:23:14 +0000 (15:23 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 19 Mar 2004 15:23:14 +0000 (15:23 +0000)
                       Py_USING_UNICODE is defined

Objects/fileobject.c

index efbd6b66b9c56fb92666e03453d7a999468ff2d7..127abceae41ea4d960ba61e97b2be8cd7447cb2c 100644 (file)
@@ -2074,8 +2074,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;