Skip to content

Commit 56d285b

Browse files
committed
Remove redundant assertion
1 parent 23c1ff3 commit 56d285b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎Objects/unicodeobject.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15227,8 +15227,8 @@ encode_wstr_utf8(wchar_t *wstr, char **str, const char *name)
1522715227
{
1522815228
assert(str != NULL);
1522915229

15230-
size_t output_length;
15231-
int res = _Py_EncodeUTF8(wstr, str, &output_length,
15230+
size_t unused_output_length;
15231+
int res = _Py_EncodeUTF8(wstr, str, &unused_output_length,
1523215232
NULL, 1, _Py_ERROR_STRICT);
1523315233
if (res == -2) {
1523415234
PyErr_Format(PyExc_RuntimeError, "cannot encode %s", name);
@@ -15238,7 +15238,6 @@ encode_wstr_utf8(wchar_t *wstr, char **str, const char *name)
1523815238
PyErr_NoMemory();
1523915239
return -1;
1524015240
}
15241-
assert(strlen(*str) == output_length);
1524215241
return 0;
1524315242
}
1524415243

0 commit comments

Comments
 (0)