diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-08 19:54:37 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-08 19:54:37 (GMT) |
commit | 2cba0bf57340c299b9b51681a44f37d95787a47d (patch) | |
tree | faec5bc1c3b79bed7beeb9bb81aad166e3d29946 /generic/tclTestObj.c | |
parent | 3e074a01a25b4f670b3558513ce29e29b20a9357 (diff) | |
download | tcl-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.c | 4 |
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; |