From: Victor Stinner Date: Wed, 14 Oct 2015 09:59:46 +0000 (+0200) Subject: Issue #25401: Remove now unused hex_digit_to_int() function X-Git-Tag: v3.6.0a1~1223 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f091033b149792e4084a479444c39636c7be2cad;p=thirdparty%2FPython%2Fcpython.git Issue #25401: Remove now unused hex_digit_to_int() function --- diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index b270fcccc679..21031479b8b8 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -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