mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
PyFile_WriteObject(): some of the local variables are only used when
Py_USING_UNICODE is defined
This commit is contained in:
parent
8e6ad6fbe9
commit
086a0f79cd
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue