diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-07-05 14:23:21 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-07-05 14:23:21 (GMT) |
commit | 508e022fa975ee61d6aef292a45eabccc2e3d662 (patch) | |
tree | 12ef2aef9ac316f393476275b8915d0ecea07b8d /libtommath/tommath_private.h | |
parent | 505f963287b050bd46871d4659cebc65986ca5ac (diff) | |
download | tcl-508e022fa975ee61d6aef292a45eabccc2e3d662.zip tcl-508e022fa975ee61d6aef292a45eabccc2e3d662.tar.gz tcl-508e022fa975ee61d6aef292a45eabccc2e3d662.tar.bz2 |
Update to latest "develop" branch of libtommath
Diffstat (limited to 'libtommath/tommath_private.h')
-rw-r--r-- | libtommath/tommath_private.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libtommath/tommath_private.h b/libtommath/tommath_private.h index ad59c04..3271d7e 100644 --- a/libtommath/tommath_private.h +++ b/libtommath/tommath_private.h @@ -264,7 +264,7 @@ MP_DEPRECATED(s_mp_reverse) void bn_reverse(unsigned char *s, int len); return MP_OKAY; \ } -#define MP_GET_MAG(type, name) \ +#define MP_GET_MAG(name, type) \ type name(const mp_int* a) \ { \ unsigned i = MP_MIN((unsigned)a->used, (unsigned)((MP_SIZEOF_BITS(type) + MP_DIGIT_BIT - 1) / MP_DIGIT_BIT)); \ @@ -277,10 +277,10 @@ MP_DEPRECATED(s_mp_reverse) void bn_reverse(unsigned char *s, int len); return res; \ } -#define MP_GET_SIGNED(type, name, mag) \ +#define MP_GET_SIGNED(name, mag, type, utype) \ type name(const mp_int* a) \ { \ - uint64_t res = mag(a); \ + utype res = mag(a); \ return (a->sign == MP_NEG) ? (type)-res : (type)res; \ } |