diff options
author | Guido van Rossum <guido@python.org> | 2007-05-03 17:49:24 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-05-03 17:49:24 (GMT) |
commit | 8d30cc0144a6a94e06f3a115b07afa6314466cfd (patch) | |
tree | 0c0b2f3d75cca4173ec3e8e2962682affbd2e886 /Objects/fileobject.c | |
parent | 938ef57e267838dcfbfb0d51d9bd40caece1c5db (diff) | |
download | cpython-8d30cc0144a6a94e06f3a115b07afa6314466cfd.zip cpython-8d30cc0144a6a94e06f3a115b07afa6314466cfd.tar.gz cpython-8d30cc0144a6a94e06f3a115b07afa6314466cfd.tar.bz2 |
Get rid of all #ifdef Py_USING_UNICODE (it is always present now).
(With the help of unifdef from freshmeat.)
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r-- | Objects/fileobject.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index d12e132..50b3cd6 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -412,7 +412,6 @@ static PyObject * file_repr(PyFileObject *f) { if (PyUnicode_Check(f->f_name)) { -#ifdef Py_USING_UNICODE PyObject *ret = NULL; PyObject *name = PyUnicode_AsUnicodeEscapeString(f->f_name); const char *name_str = name ? PyString_AsString(name) : "?"; @@ -423,7 +422,6 @@ file_repr(PyFileObject *f) f); Py_XDECREF(name); return ret; -#endif } else { return PyString_FromFormat("<%s file '%s', mode '%s' at %p>", f->f_fp == NULL ? "closed" : "open", @@ -1337,7 +1335,6 @@ PyFile_GetLine(PyObject *f, int n) } } } -#ifdef Py_USING_UNICODE if (n < 0 && result != NULL && PyUnicode_Check(result)) { Py_UNICODE *s = PyUnicode_AS_UNICODE(result); Py_ssize_t len = PyUnicode_GET_SIZE(result); @@ -1358,7 +1355,6 @@ PyFile_GetLine(PyObject *f, int n) } } } -#endif return result; } @@ -2124,15 +2120,12 @@ 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; } -#ifdef Py_USING_UNICODE if ((flags & Py_PRINT_RAW) && PyUnicode_Check(v) && enc != Py_None) { char *cenc = PyString_AS_STRING(enc); @@ -2146,9 +2139,6 @@ PyFile_WriteObject(PyObject *v, PyObject *f, int flags) result = PyObject_Print(value, fp, flags); Py_DECREF(value); return result; -#else - return PyObject_Print(v, fp, flags); -#endif } writer = PyObject_GetAttrString(f, "write"); if (writer == NULL) |