summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-09-04 14:37:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-09-04 14:37:43 (GMT)
commit2562ea174bddf62331bd7d71ebd4b49f53ad8345 (patch)
tree18ec72281d93eb90c05f3b6f947fb30bbd8c1d1d /generic/tclStringObj.c
parent3250944e1f22b157135a65f72ee3a36c6f2b336d (diff)
parentfdf1df3b29531c5031a33f2e3c1f4668937c1c5f (diff)
downloadtcl-2562ea174bddf62331bd7d71ebd4b49f53ad8345.zip
tcl-2562ea174bddf62331bd7d71ebd4b49f53ad8345.tar.gz
tcl-2562ea174bddf62331bd7d71ebd4b49f53ad8345.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r--generic/tclStringObj.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 38e0c13..14bb05e 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -2041,33 +2041,15 @@ Tcl_AppendFormatToObj(
}
#ifndef TCL_WIDE_INT_IS_LONG
} else if (useWide) {
- if (TclGetWideIntFromObj(NULL, segment, &w) != TCL_OK) {
- Tcl_Obj *objPtr;
-
- if (Tcl_GetBignumFromObj(interp,segment,&big) != TCL_OK) {
- goto error;
- }
- mp_mod_2d(&big, (int) CHAR_BIT*sizeof(Tcl_WideInt), &big);
- objPtr = Tcl_NewBignumObj(&big);
- Tcl_IncrRefCount(objPtr);
- TclGetWideIntFromObj(NULL, objPtr, &w);
- Tcl_DecrRefCount(objPtr);
+ if (TclGetWideBitsFromObj(interp, segment, &w) != TCL_OK) {
+ goto error;
}
isNegative = (w < (Tcl_WideInt) 0);
if (w == (Tcl_WideInt) 0) gotHash = 0;
#endif
} else if (TclGetLongFromObj(NULL, segment, &l) != TCL_OK) {
- if (TclGetWideIntFromObj(NULL, segment, &w) != TCL_OK) {
- Tcl_Obj *objPtr;
-
- if (Tcl_GetBignumFromObj(interp,segment,&big) != TCL_OK) {
- goto error;
- }
- mp_mod_2d(&big, (int) CHAR_BIT * sizeof(long), &big);
- objPtr = Tcl_NewBignumObj(&big);
- Tcl_IncrRefCount(objPtr);
- TclGetLongFromObj(NULL, objPtr, &l);
- Tcl_DecrRefCount(objPtr);
+ if (TclGetWideBitsFromObj(interp, segment, &w) != TCL_OK) {
+ goto error;
} else {
l = Tcl_WideAsLong(w);
}