summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2004-03-19 15:22:36 (GMT)
committerFred Drake <fdrake@acm.org>2004-03-19 15:22:36 (GMT)
commit086a0f79cd56ce64062b599f4cb10b329ee33323 (patch)
treea6532dc6b7ff6c607b2661c8b082b796de06aec7 /Objects
parent8e6ad6fbe968e500f064d1bdabca38835da9b34b (diff)
downloadcpython-086a0f79cd56ce64062b599f4cb10b329ee33323.zip
cpython-086a0f79cd56ce64062b599f4cb10b329ee33323.tar.gz
cpython-086a0f79cd56ce64062b599f4cb10b329ee33323.tar.bz2
PyFile_WriteObject(): some of the local variables are only used when
Py_USING_UNICODE is defined
Diffstat (limited to 'Objects')
-rw-r--r--Objects/fileobject.c2
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;