summaryrefslogtreecommitdiffstats
path: root/libtommath/tommath_private.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-05 14:23:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-05 14:23:21 (GMT)
commit508e022fa975ee61d6aef292a45eabccc2e3d662 (patch)
tree12ef2aef9ac316f393476275b8915d0ecea07b8d /libtommath/tommath_private.h
parent505f963287b050bd46871d4659cebc65986ca5ac (diff)
downloadtcl-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.h6
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; \
}