]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-108753: _Py_PrintSpecializationStats() uses Py_hexdigits (#109040)
authorVictor Stinner <vstinner@python.org>
Thu, 7 Sep 2023 02:47:57 +0000 (04:47 +0200)
committerGitHub <noreply@github.com>
Thu, 7 Sep 2023 02:47:57 +0000 (04:47 +0200)
Python/specialize.c

index e072167ff38ce9b7bf4c8e4b5cd57b687af31835..8b4aac2f890930e28422b61ccf0266927c4035d2 100644 (file)
@@ -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];