summaryrefslogtreecommitdiffstats
path: root/generic/tclTestObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-25 21:50:34 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-25 21:50:34 (GMT)
commit6d27f27fe64178257962cf3fa9cab61b03cbcc51 (patch)
treec8909ef172c239ac052863e6cb5f450c68465f4b /generic/tclTestObj.c
parentaaf56c80863b3c12efb020dd21eaa440be153968 (diff)
downloadtcl-6d27f27fe64178257962cf3fa9cab61b03cbcc51.zip
tcl-6d27f27fe64178257962cf3fa9cab61b03cbcc51.tar.gz
tcl-6d27f27fe64178257962cf3fa9cab61b03cbcc51.tar.bz2
Eliminate all usage of mp_iszero/mp_iseven/mp_isodd/mp_isneg from libtommath: In the upcoming new version those will become real functions, causing possible binary incompatibility. This change makes Tcl independant from libtommath's changes.
Diffstat (limited to 'generic/tclTestObj.c')
-rw-r--r--generic/tclTestObj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c
index f7d2bae..e395435 100644
--- a/generic/tclTestObj.c
+++ b/generic/tclTestObj.c
@@ -290,9 +290,9 @@ TestbignumobjCmd(
return TCL_ERROR;
}
if (!Tcl_IsShared(varPtr[varIndex])) {
- Tcl_SetIntObj(varPtr[varIndex], mp_iseven(&bignumValue));
+ Tcl_SetIntObj(varPtr[varIndex], !mp_get_bit(&bignumValue, 0));
} else {
- SetVarToObj(varPtr, varIndex, Tcl_NewIntObj(mp_iseven(&bignumValue)));
+ SetVarToObj(varPtr, varIndex, Tcl_NewIntObj(!mp_get_bit(&bignumValue, 0)));
}
mp_clear(&bignumValue);
break;