py3: name for file-from-fd is unneeded, since py3 won't show it anyway

"Changed in version 3.2: Ignore name attribute."
This commit is contained in:
Eli Schwartz 2019-07-04 13:12:52 -04:00
parent de17dd27c9
commit 73ea548159
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6

View File

@ -139,7 +139,7 @@ speedup_fdopen(PyObject *self, PyObject *args) {
if (!PyArg_ParseTuple(args, "iss|i", &fd, &name, &mode, &bufsize)) return NULL;
#if PY_MAJOR_VERSION >= 3
ans = PyFile_FromFd(fd, name, mode, bufsize, NULL, NULL, NULL, 1);
ans = PyFile_FromFd(fd, NULL, mode, bufsize, NULL, NULL, NULL, 1);
#else
fp = fdopen(fd, mode);
if (fp == NULL) return PyErr_SetFromErrno(PyExc_OSError);