https://github.com/python/cpython/commit/63a4273031337aa2353affbe2b162a601f95f3d1
commit: 63a4273031337aa2353affbe2b162a601f95f3d1
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: picnixz <[email protected]>
date: 2025-03-23T11:39:46Z
summary:
[3.12] gh-131418: remove unused legacy typedefs in `{md5,sha1}module.c`
(GH-131420) (#131619)
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 <[email protected]>
files:
M Modules/md5module.c
M Modules/sha1module.c
diff --git a/Modules/md5module.c b/Modules/md5module.c
index dcc9da38d7568c..b39effc00de70b 100644
--- a/Modules/md5module.c
+++ b/Modules/md5module.c
@@ -30,15 +30,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
diff --git a/Modules/sha1module.c b/Modules/sha1module.c
index 624dc57b0a3be6..a8311fb306c39d 100644
--- a/Modules/sha1module.c
+++ b/Modules/sha1module.c
@@ -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
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]