Simplify __init__()

This commit is contained in:
Zackery Spytz 2020-07-16 08:43:18 -06:00
parent d18e623b5d
commit 0d064f6aeb
1 changed files with 5 additions and 6 deletions

View File

@ -251,14 +251,13 @@ _io_IncrementalNewlineDecoder___init___impl(nldecoder_object *self,
/*[clinic end generated code: output=fbd04d443e764ec2 input=89db6b19c6b126bf]*/
{
if (errors == NULL) {
Py_XSETREF(self->errors, _PyUnicode_FromId(&PyId_strict));
if (self->errors == NULL)
errors = _PyUnicode_FromId(&PyId_strict);
if (errors == NULL) {
return -1;
}
else {
Py_XSETREF(self->errors, errors);
}
Py_INCREF(self->errors);
Py_INCREF(errors);
Py_XSETREF(self->errors, errors);
Py_INCREF(decoder);
Py_XSETREF(self->decoder, decoder);