]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #25401: Remove now unused hex_digit_to_int() function
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 14 Oct 2015 09:59:46 +0000 (11:59 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 14 Oct 2015 09:59:46 +0000 (11:59 +0200)
Objects/bytearrayobject.c

index b270fcccc679e4e4252cc64c0eefa503f8e1d522..21031479b8b8b96c7c27d48f9f82f93651e8575f 100644 (file)
@@ -2789,22 +2789,6 @@ bytearray_splitlines_impl(PyByteArrayObject *self, int keepends)
         );
 }
 
-static int
-hex_digit_to_int(Py_UCS4 c)
-{
-    if (c >= 128)
-        return -1;
-    if (Py_ISDIGIT(c))
-        return c - '0';
-    else {
-        if (Py_ISUPPER(c))
-            c = Py_TOLOWER(c);
-        if (c >= 'a' && c <= 'f')
-            return c - 'a' + 10;
-    }
-    return -1;
-}
-
 /*[clinic input]
 @classmethod
 bytearray.fromhex