Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 66b3270

Browse files
committed
_Py_normalize_encoding(): explain how the value 6 was computed
1 parent bd303c1 commit 66b3270

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Objects/unicodeobject.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2983,6 +2983,7 @@ _Py_normalize_encoding(const char *encoding,
29832983
char *l_end;
29842984

29852985
if (encoding == NULL) {
2986+
/* 6 == strlen("utf-8") + 1 */
29862987
if (lower_len < 6)
29872988
return 0;
29882989
strcpy(lower, "utf-8");

0 commit comments

Comments
 (0)