diff options
Diffstat (limited to 'generic/tclScan.c')
-rw-r--r-- | generic/tclScan.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/tclScan.c b/generic/tclScan.c index 4d86382..67fe6f3 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -716,7 +716,7 @@ Tcl_ScanObjCmd( switch (ch) { case 'n': if (!(flags & SCAN_SUPPRESS)) { - objPtr = Tcl_NewWideIntObj(string - baseString); + TclNewIntObj(objPtr, string - baseString); Tcl_IncrRefCount(objPtr); CLANG_ASSERT(objs); objs[objIndex++] = objPtr; @@ -879,7 +879,7 @@ Tcl_ScanObjCmd( offset = TclUtfToUCS4(string, &i); string += offset; if (!(flags & SCAN_SUPPRESS)) { - objPtr = Tcl_NewWideIntObj(i); + TclNewIntObj(objPtr, i); Tcl_IncrRefCount(objPtr); CLANG_ASSERT(objs); objs[objIndex++] = objPtr; @@ -890,7 +890,7 @@ Tcl_ScanObjCmd( /* * Scan an unsigned or signed integer. */ - objPtr = Tcl_NewWideIntObj(0); + TclNewIntObj(objPtr, 0); Tcl_IncrRefCount(objPtr); if (width == 0) { width = ~0; @@ -937,16 +937,16 @@ Tcl_ScanObjCmd( } else if (flags & SCAN_BIG) { if (flags & SCAN_UNSIGNED) { mp_int big; - int code = Tcl_GetBignumFromObj(interp, objPtr, &big); + int res = Tcl_GetBignumFromObj(interp, objPtr, &big); - if (code == TCL_OK) { + if (res == TCL_OK) { if (mp_isneg(&big)) { - code = TCL_ERROR; + res = TCL_ERROR; } mp_clear(&big); } - if (code == TCL_ERROR) { + if (res == TCL_ERROR) { if (objs != NULL) { ckfree(objs); } @@ -1068,7 +1068,7 @@ Tcl_ScanObjCmd( * Here no vars were specified, we want a list returned (inline scan) */ - objPtr = Tcl_NewObj(); + TclNewObj(objPtr); for (i = 0; i < totalVars; i++) { if (objs[i] != NULL) { Tcl_ListObjAppendElement(NULL, objPtr, objs[i]); @@ -1089,16 +1089,16 @@ Tcl_ScanObjCmd( if (code == TCL_OK) { if (underflow && (nconversions == 0)) { if (numVars) { - objPtr = Tcl_NewWideIntObj(-1); + TclNewIntObj(objPtr, TCL_INDEX_NONE); } else { if (objPtr) { Tcl_SetListObj(objPtr, 0, NULL); } else { - objPtr = Tcl_NewObj(); + TclNewObj(objPtr); } } } else if (numVars) { - objPtr = Tcl_NewWideIntObj(result); + TclNewIntObj(objPtr, result); } Tcl_SetObjResult(interp, objPtr); } |