]> granicus.if.org Git - python/commitdiff
_Py_normalize_encoding(): explain how the value 6 was computed
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 7 Nov 2013 22:12:23 +0000 (23:12 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 7 Nov 2013 22:12:23 +0000 (23:12 +0100)
Objects/unicodeobject.c

index 1375ef3093d7cbc6d19cdc34c22f8c65b4fdfad5..224a80b45e4d5bf36cf9da072020d68ffdc48f1f 100644 (file)
@@ -2983,6 +2983,7 @@ _Py_normalize_encoding(const char *encoding,
     char *l_end;
 
     if (encoding == NULL) {
+        /* 6 == strlen("utf-8") + 1 */
         if (lower_len < 6)
             return 0;
         strcpy(lower, "utf-8");