Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix unused variable
  • Loading branch information
methane committed Apr 11, 2022
commit da02718aa79c48f397efc481d3561451feb5556a
3 changes: 1 addition & 2 deletions Modules/_io/textio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,6 @@ _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer,
/*[clinic end generated code: output=72267c0c01032ed2 input=77d8696d1a1f460b]*/
{
PyObject *raw, *codec_info = NULL;
_PyIO_State *state = NULL;
PyObject *res;
int r;
int use_locale_encoding = 0; // Use locale encoding even in UTF-8 mode.
Expand Down Expand Up @@ -1123,7 +1122,7 @@ _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer,
if (encoding == NULL) {
/* Try os.device_encoding(fileno) */
PyObject *fileno;
state = IO_STATE();
_PyIO_State *state = IO_STATE();
if (state == NULL)
goto error;
fileno = PyObject_CallMethodNoArgs(buffer, &_Py_ID(fileno));
Expand Down