summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-05-14 18:42:59 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-05-14 18:42:59 (GMT)
commit8094d33e4331c3f61d015b91018908fa6fb60b96 (patch)
treeb5d2417771b80a199ad0cd55f85480951fa55404 /generic/tclObj.c
parent95d2a7f7c08f468c9d9dbfed451dd3bad2a37129 (diff)
downloadtcl-8094d33e4331c3f61d015b91018908fa6fb60b96.zip
tcl-8094d33e4331c3f61d015b91018908fa6fb60b96.tar.gz
tcl-8094d33e4331c3f61d015b91018908fa6fb60b96.tar.bz2
DIGIT_BIT -> MP_DIGIT_BIT, since DIGIT_BIT is deprecated in future libtommath versions. So, better stop using it at all.
Also add some other defines/typdefs for future libtommath compatibility.
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r--generic/tclObj.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 5b11071..a283dd8 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -2778,8 +2778,8 @@ Tcl_GetLongFromObj(
mp_int big;
UNPACK_BIGNUM(objPtr, big);
- if ((size_t)(big.used) <= (CHAR_BIT * sizeof(long) + DIGIT_BIT - 1)
- / DIGIT_BIT) {
+ if ((size_t)(big.used) <= (CHAR_BIT * sizeof(long) + MP_DIGIT_BIT - 1)
+ / MP_DIGIT_BIT) {
unsigned long value = 0, numBytes = sizeof(long);
long scratch;
unsigned char *bytes = (unsigned char *)&scratch;
@@ -3079,7 +3079,7 @@ Tcl_GetWideIntFromObj(
UNPACK_BIGNUM(objPtr, big);
if ((size_t)(big.used) <= (CHAR_BIT * sizeof(Tcl_WideInt)
- + DIGIT_BIT - 1) / DIGIT_BIT) {
+ + MP_DIGIT_BIT - 1) / MP_DIGIT_BIT) {
Tcl_WideUInt value = 0;
unsigned long numBytes = sizeof(Tcl_WideInt);
Tcl_WideInt scratch;
@@ -3498,7 +3498,7 @@ Tcl_SetBignumObj(
Tcl_Panic("%s called with shared object", "Tcl_SetBignumObj");
}
if ((size_t)(bignumValue->used)
- <= (CHAR_BIT * sizeof(long) + DIGIT_BIT - 1) / DIGIT_BIT) {
+ <= (CHAR_BIT * sizeof(long) + MP_DIGIT_BIT - 1) / MP_DIGIT_BIT) {
unsigned long value = 0, numBytes = sizeof(long);
long scratch;
unsigned char *bytes = (unsigned char *)&scratch;
@@ -3522,7 +3522,7 @@ Tcl_SetBignumObj(
tooLargeForLong:
#ifndef NO_WIDE_TYPE
if ((size_t)(bignumValue->used)
- <= (CHAR_BIT * sizeof(Tcl_WideInt) + DIGIT_BIT - 1) / DIGIT_BIT) {
+ <= (CHAR_BIT * sizeof(Tcl_WideInt) + MP_DIGIT_BIT - 1) / MP_DIGIT_BIT) {
Tcl_WideUInt value = 0;
unsigned long numBytes = sizeof(Tcl_WideInt);
Tcl_WideInt scratch;