[Python-checkins] python/dist/src/Objects fileobject.c,2.168,2.169
Neal Norwitz
neal@metaslash.com
Thu, 3 Oct 2002 18:36:52 -0400
> --- 329,350 ----
> file_repr(PyFileObject *f)
> {
> ! if (PyUnicode_Check(f->f_name)) {
> ! PyObject *ret = NULL;
> ! PyObject *name;
> ! name = PyUnicode_AsUnicodeEscapeString(f->f_name);
Doesn't name need to be checked here for NULL?
It's passed to PyString_AsString on the line below.
> ! ret = PyString_FromFormat("<%s file u'%s', mode '%s' at %p>",
> ! f->f_fp == NULL ? "closed" : "open",
> ! PyString_AsString(name),
> ! PyString_AsString(f->f_mode),
> ! f);
> ! Py_XDECREF(name);
> ! return ret;
> --- 1826,1856 ----
> }
>
> ! #ifdef Py_WIN_WIDE_FILENAMES
> ! if (GetVersion() < 0x80000000) { /* On NT, so wide API available */
Did you mean 'no wide' instead of 'so wide'?
Neal