Show More
@@ -1219,9 +1219,7 b' static PyObject *posixfile(PyObject *sel' | |||
|
1219 | 1219 | char fpmode[4]; |
|
1220 | 1220 | int fppos = 0; |
|
1221 | 1221 | int plus; |
|
1222 | #ifndef IS_PY3K | |
|
1223 | 1222 | FILE *fp; |
|
1224 | #endif | |
|
1225 | 1223 | |
|
1226 | 1224 | if (!PyArg_ParseTupleAndKeywords(args, kwds, PY23("et|si:posixfile", |
|
1227 | 1225 | "et|yi:posixfile"), |
@@ -1294,7 +1292,6 b' static PyObject *posixfile(PyObject *sel' | |||
|
1294 | 1292 | PyErr_SetFromErrnoWithFilename(PyExc_IOError, name); |
|
1295 | 1293 | goto bail; |
|
1296 | 1294 | } |
|
1297 | #ifndef IS_PY3K | |
|
1298 | 1295 | fp = _fdopen(fd, fpmode); |
|
1299 | 1296 | if (fp == NULL) { |
|
1300 | 1297 | _close(fd); |
@@ -1309,11 +1306,6 b' static PyObject *posixfile(PyObject *sel' | |||
|
1309 | 1306 | } |
|
1310 | 1307 | |
|
1311 | 1308 | PyFile_SetBufSize(file_obj, bufsize); |
|
1312 | #else | |
|
1313 | file_obj = PyFile_FromFd(fd, name, mode, bufsize, NULL, NULL, NULL, 1); | |
|
1314 | if (file_obj == NULL) | |
|
1315 | goto bail; | |
|
1316 | #endif | |
|
1317 | 1309 | bail: |
|
1318 | 1310 | PyMem_Free(name); |
|
1319 | 1311 | return file_obj; |
General Comments 0
You need to be logged in to leave comments.
Login now