]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-131418: remove unused legacy typedefs in `{md5,sha1}module.c` (GH-131420...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 23 Mar 2025 12:21:57 +0000 (13:21 +0100)
committerGitHub <noreply@github.com>
Sun, 23 Mar 2025 12:21:57 +0000 (12:21 +0000)
gh-131418: remove unused legacy typedefs in `{md5,sha1}module.c` (GH-131420)

- Remove legacy typedefs `MD5_INT32` and `MD5_INT64` in `Modules/md5module.c`
- Remove legacy typedefs `SHA1_INT32` and `SHA1_INT64` in `Modules/sha1module.c`.

Those legacy typedefs were used to detect whether the host platform could
correctly implement MD5 and SHA-1, but this is no longer needed as we now
fallback to HACL* implementations.
(cherry picked from commit a9a399f0ecfeeff91425cc089057f1b95799853b)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Modules/md5module.c
Modules/sha1module.c

index ef9163e8be5b6c7063133eaedf1e700b5add784a..0f0c7badb9b6eea69f3880274cab1ef1787cfaf9 100644 (file)
@@ -29,15 +29,6 @@ class MD5Type "MD5object *" "&PyType_Type"
 [clinic start generated code]*/
 /*[clinic end generated code: output=da39a3ee5e6b4b0d input=6e5261719957a912]*/
 
-/* Some useful types */
-
-#if SIZEOF_INT == 4
-typedef unsigned int MD5_INT32; /* 32-bit integer */
-typedef long long MD5_INT64; /* 64-bit integer */
-#else
-/* not defined. compilation will die. */
-#endif
-
 /* The MD5 block size and message digest sizes, in bytes */
 
 #define MD5_BLOCKSIZE    64
index 34a427a39b5cf844754bdbff8a838aadb16d3abb..99ad699ebf1eb756286d4a05fe541b9aed1f6aa9 100644 (file)
@@ -30,15 +30,6 @@ class SHA1Type "SHA1object *" "&PyType_Type"
 [clinic start generated code]*/
 /*[clinic end generated code: output=da39a3ee5e6b4b0d input=3dc9a20d1becb759]*/
 
-/* Some useful types */
-
-#if SIZEOF_INT == 4
-typedef unsigned int SHA1_INT32;        /* 32-bit integer */
-typedef long long SHA1_INT64;        /* 64-bit integer */
-#else
-/* not defined. compilation will die. */
-#endif
-
 /* The SHA1 block size and message digest sizes, in bytes */
 
 #define SHA1_BLOCKSIZE    64