diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-11-12 12:11:05 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-11-12 12:11:05 (GMT) |
commit | 41e4211a15b085e6f456693fe2ef6ad980bde593 (patch) | |
tree | 2115df6e1746693165934fe335889d189f533313 /generic/tclScan.c | |
parent | e512564f360551e1821bc646ce75314246b9a0ee (diff) | |
parent | 34714bcefaa3ba23593153c232829b2af6914528 (diff) | |
download | tcl-41e4211a15b085e6f456693fe2ef6ad980bde593.zip tcl-41e4211a15b085e6f456693fe2ef6ad980bde593.tar.gz tcl-41e4211a15b085e6f456693fe2ef6ad980bde593.tar.bz2 |
Merge 8.7. Finish implementation.
Diffstat (limited to 'generic/tclScan.c')
-rw-r--r-- | generic/tclScan.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/generic/tclScan.c b/generic/tclScan.c index 50a3fe3..ba24ecf 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -929,13 +929,12 @@ Tcl_ScanObjCmd( } if ((flags & SCAN_UNSIGNED) && (wideValue < 0)) { mp_int big; - if (mp_init(&big) != MP_OKAY) { + if (mp_init_u64(&big, (Tcl_WideUInt)wideValue) != MP_OKAY) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "insufficient memory to create bignum", -1)); Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); return TCL_ERROR; } else { - mp_set_u64(&big, (Tcl_WideUInt)wideValue); Tcl_SetBignumObj(objPtr, &big); } } else { @@ -976,13 +975,12 @@ Tcl_ScanObjCmd( if ((flags & SCAN_UNSIGNED) && (value < 0)) { #ifdef TCL_WIDE_INT_IS_LONG mp_int big; - if (mp_init(&big) != MP_OKAY) { + if (mp_init_u64(&big, (unsigned long)value) != MP_OKAY) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "insufficient memory to create bignum", -1)); Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); return TCL_ERROR; } else { - mp_set_u64(&big, (unsigned long)value); Tcl_SetBignumObj(objPtr, &big); } #else |