summaryrefslogtreecommitdiffstats
path: root/generic/tclTestObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-08 19:54:37 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-08 19:54:37 (GMT)
commit2cba0bf57340c299b9b51681a44f37d95787a47d (patch)
treefaec5bc1c3b79bed7beeb9bb81aad166e3d29946 /generic/tclTestObj.c
parent3e074a01a25b4f670b3558513ce29e29b20a9357 (diff)
downloadtcl-2cba0bf57340c299b9b51681a44f37d95787a47d.zip
tcl-2cba0bf57340c299b9b51681a44f37d95787a47d.tar.gz
tcl-2cba0bf57340c299b9b51681a44f37d95787a47d.tar.bz2
Use mp_get_bit() instead of mp_iseven()/mp_isodd(): Those latter functions are macro's currently, but will be real function in next libtommath. Bad idea for Tcl to depend on ...
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 67b1997..6fe4338 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;