[Python-checkins] cpython (3.6): Fix _Py_normalize_encoding() command

victor.stinner python-checkins at python.org
Wed Oct 12 07:59:37 EDT 2016


https://hg.python.org/cpython/rev/ac2f7cfff9a2
changeset:   104464:ac2f7cfff9a2
branch:      3.6
parent:      104462:6a6ac890db78
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Wed Oct 12 13:57:45 2016 +0200
summary:
  Fix _Py_normalize_encoding() command

It's not exactly the same than encodings.normalize_encoding(): the C function
also converts to lowercase.

files:
  Objects/unicodeobject.c |  6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -3100,9 +3100,9 @@
     return v;
 }
 
-/* Normalize an encoding name: C implementation of
-   encodings.normalize_encoding(). Return 1 on success, or 0 on error (encoding
-   is longer than lower_len-1). */
+/* Normalize an encoding name: similar to encodings.normalize_encoding(), but
+   also convert to lowercase. Return 1 on success, or 0 on error (encoding is
+   longer than lower_len-1). */
 int
 _Py_normalize_encoding(const char *encoding,
                        char *lower,

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list