Skip to content

Commit e23d19c

Browse files
Correct build error
1 parent 4c90522 commit e23d19c

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

Objects/unicodeobject.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13163,31 +13163,27 @@ unicode_maketrans_impl(PyObject *x, PyObject *y, PyObject *z)
1316313163
if (PyUnicode_GET_LENGTH(key) != 1) {
1316413164
PyErr_SetString(PyExc_ValueError, "string keys in translate "
1316513165
"table must be of length 1");
13166-
goto err_in_cs;
13166+
return NULL;
1316713167
}
1316813168
kind = PyUnicode_KIND(key);
1316913169
data = PyUnicode_DATA(key);
1317013170
newkey = PyLong_FromLong(PyUnicode_READ(kind, data, 0));
1317113171
if (!newkey)
13172-
goto err_in_cs;
13172+
return NULL;
1317313173
res = PyDict_SetItem(new, newkey, value);
1317413174
Py_DECREF(newkey);
1317513175
if (res < 0)
13176-
goto err_in_cs;
13176+
return NULL;
1317713177
} else if (PyLong_Check(key)) {
1317813178
/* just keep integer keys */
1317913179
if (PyDict_SetItem(new, key, value) < 0)
13180-
goto err_in_cs;
13180+
return NULL;
1318113181
} else {
1318213182
PyErr_SetString(PyExc_TypeError, "keys in translate table must "
1318313183
"be strings or integers");
13184-
goto err_in_cs;
13184+
return NULL;
1318513185
}
1318613186
}
13187-
goto done;
13188-
err_in_cs:
13189-
Py_CLEAR(new);
13190-
done:
1319113187
Py_END_CRITICAL_SECTION();
1319213188
return new;
1319313189
}

0 commit comments

Comments
 (0)