summaryrefslogtreecommitdiffstats
path: root/libtommath
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-04-02 13:49:08 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-04-02 13:49:08 (GMT)
commit1661066b2cf5be027b01317224c2dc8bd46cd620 (patch)
treebea61874654cc7a1553aacd4e4a2ffe7ff4cff86 /libtommath
parentbfa6e2e15d74c53e8417e4df6cc05cc9feb03521 (diff)
parent062a4458dfbdb2d8db7954389760d2a4f32fe1d9 (diff)
downloadtcl-1661066b2cf5be027b01317224c2dc8bd46cd620.zip
tcl-1661066b2cf5be027b01317224c2dc8bd46cd620.tar.gz
tcl-1661066b2cf5be027b01317224c2dc8bd46cd620.tar.bz2
Merge 8.7 (removing some dead libtommath-related code)
Diffstat (limited to 'libtommath')
-rw-r--r--libtommath/bn_deprecated.c9
-rw-r--r--libtommath/bn_mp_expt_n.c10
2 files changed, 9 insertions, 10 deletions
diff --git a/libtommath/bn_deprecated.c b/libtommath/bn_deprecated.c
index fc19092..477bc29 100644
--- a/libtommath/bn_deprecated.c
+++ b/libtommath/bn_deprecated.c
@@ -249,6 +249,15 @@ mp_err mp_expt_d(const mp_int *a, mp_digit b, mp_int *c)
return mp_expt_n(a, (int)b, c);
}
#endif
+#ifdef BN_MP_EXPT_U32_C
+mp_err mp_expt_u32(const mp_int *a, uint32_t b, mp_int *c)
+{
+ if (b > MP_MIN(MP_DIGIT_MAX, INT_MAX)) {
+ return MP_VAL;
+ }
+ return mp_expt_n(a, (int)b, c);
+}
+#endif
#ifdef BN_MP_N_ROOT_EX_C
mp_err mp_n_root_ex(const mp_int *a, mp_digit b, mp_int *c, int fast)
{
diff --git a/libtommath/bn_mp_expt_n.c b/libtommath/bn_mp_expt_n.c
index 19c0225..2b8b6d4 100644
--- a/libtommath/bn_mp_expt_n.c
+++ b/libtommath/bn_mp_expt_n.c
@@ -3,16 +3,6 @@
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
-#ifdef BN_MP_EXPT_U32_C
-mp_err mp_expt_u32(const mp_int *a, uint32_t b, mp_int *c)
-{
- if (b > MP_MIN(MP_DIGIT_MAX, INT_MAX)) {
- return MP_VAL;
- }
- return mp_expt_n(a, (int)b, c);
-}
-#endif
-
/* calculate c = a**b using a square-multiply algorithm */
mp_err mp_expt_n(const mp_int *a, int b, mp_int *c)
{