diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-11-08 15:32:33 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-11-08 15:32:33 (GMT) |
| commit | c1f8c0290006c19eba948b7aaec6ae6ae0e0099c (patch) | |
| tree | 51d02eca13a20f54a2a2e9a7d93db6da5f6fde84 /generic/tclTomMathInterface.c | |
| parent | 65946d3f86dd49b65b128b71d4b2c4b4a020a277 (diff) | |
| download | tcl-c1f8c0290006c19eba948b7aaec6ae6ae0e0099c.zip tcl-c1f8c0290006c19eba948b7aaec6ae6ae0e0099c.tar.gz tcl-c1f8c0290006c19eba948b7aaec6ae6ae0e0099c.tar.bz2 | |
Add support for mp_init_i32/mp_init_i64/mp_init_l/mp_init_ll/mp_init_u32/mp_init_u64/mp_init_ul/mp_init_ull/mp_set_ull, the main functions in libtommath 1.2.0 for setting values directly in mp_int's.
One new stub entry (mp_set_ull), the others make use of already existing stub entries. This is 100% fully upwards compatible.
Diffstat (limited to 'generic/tclTomMathInterface.c')
| -rw-r--r-- | generic/tclTomMathInterface.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/generic/tclTomMathInterface.c b/generic/tclTomMathInterface.c index c28b3b1..2dc8c2d 100644 --- a/generic/tclTomMathInterface.c +++ b/generic/tclTomMathInterface.c @@ -106,7 +106,7 @@ TclBN_revision(void) *---------------------------------------------------------------------- */ -void +int TclBNInitBignumFromLong( mp_int *a, long initVal) @@ -146,6 +146,7 @@ TclBNInitBignumFromLong( v >>= MP_DIGIT_BIT; } a->used = p - a->dp; + return MP_OKAY; } /* @@ -164,7 +165,7 @@ TclBNInitBignumFromLong( *---------------------------------------------------------------------- */ -void +int TclBNInitBignumFromWideInt( mp_int *a, /* Bignum to initialize */ Tcl_WideInt v) /* Initial value */ @@ -175,6 +176,7 @@ TclBNInitBignumFromWideInt( } else { TclBNInitBignumFromWideUInt(a, (Tcl_WideUInt)v); } + return MP_OKAY; } /* @@ -193,7 +195,7 @@ TclBNInitBignumFromWideInt( *---------------------------------------------------------------------- */ -void +int TclBNInitBignumFromWideUInt( mp_int *a, /* Bignum to initialize */ Tcl_WideUInt v) /* Initial value */ @@ -222,6 +224,7 @@ TclBNInitBignumFromWideUInt( v >>= MP_DIGIT_BIT; } a->used = p - a->dp; + return MP_OKAY; } /* |
