From: Victor Stinner Date: Thu, 7 Sep 2023 02:47:57 +0000 (+0200) Subject: gh-108753: _Py_PrintSpecializationStats() uses Py_hexdigits (#109040) X-Git-Tag: v3.13.0a1~568 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fd5989bda119f8c0f8571aad88d8e9be3be678a4;p=thirdparty%2FPython%2Fcpython.git gh-108753: _Py_PrintSpecializationStats() uses Py_hexdigits (#109040) --- diff --git a/Python/specialize.c b/Python/specialize.c index e072167ff38c..8b4aac2f8909 100644 --- a/Python/specialize.c +++ b/Python/specialize.c @@ -290,8 +290,8 @@ _Py_PrintSpecializationStats(int to_file) char hex_name[41]; _PyOS_URandomNonblock(rand, 20); for (int i = 0; i < 20; i++) { - hex_name[2*i] = "0123456789abcdef"[rand[i]&15]; - hex_name[2*i+1] = "0123456789abcdef"[(rand[i]>>4)&15]; + hex_name[2*i] = Py_hexdigits[rand[i]&15]; + hex_name[2*i+1] = Py_hexdigits[(rand[i]>>4)&15]; } hex_name[40] = '\0'; char buf[64];