summaryrefslogtreecommitdiffstats
path: root/generic/tclTestObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-12 19:38:33 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-12 19:38:33 (GMT)
commit1961633531b70d5a6e627f86153f4d15e722ea8b (patch)
treeae45ec4f7d15560e77c426d92540667e45095d50 /generic/tclTestObj.c
parent00268d4ae68741fdbf73a54412cd38648f9d7302 (diff)
downloadtcl-1961633531b70d5a6e627f86153f4d15e722ea8b.zip
tcl-1961633531b70d5a6e627f86153f4d15e722ea8b.tar.gz
tcl-1961633531b70d5a6e627f86153f4d15e722ea8b.tar.bz2
If compiled with -DTCL_NO_DEPRECATED, remove Tcl_NewIntObj/Tcl_NewLongObj/Tcl_DbNewLongObj from stub table, as they will be gone in 9.0 (converted to a macro)
Use Tcl_WideInt's directly in more places, diminishing the possibility of inadvent overflow.
Diffstat (limited to 'generic/tclTestObj.c')
-rw-r--r--generic/tclTestObj.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c
index 547792a..67b1997 100644
--- a/generic/tclTestObj.c
+++ b/generic/tclTestObj.c
@@ -723,9 +723,9 @@ TestintobjCmd(
}
intValue = i;
if ((varPtr[varIndex] != NULL) && !Tcl_IsShared(varPtr[varIndex])) {
- Tcl_SetLongObj(varPtr[varIndex], intValue);
+ Tcl_SetWideIntObj(varPtr[varIndex], intValue);
} else {
- SetVarToObj(varPtr, varIndex, Tcl_NewLongObj(intValue));
+ SetVarToObj(varPtr, varIndex, Tcl_NewWideIntObj(intValue));
}
Tcl_SetObjResult(interp, varPtr[varIndex]);
} else if (strcmp(subCmd, "setmaxlong") == 0) {
@@ -734,9 +734,9 @@ TestintobjCmd(
goto wrongNumArgs;
}
if ((varPtr[varIndex] != NULL) && !Tcl_IsShared(varPtr[varIndex])) {
- Tcl_SetLongObj(varPtr[varIndex], maxLong);
+ Tcl_SetWideIntObj(varPtr[varIndex], maxLong);
} else {
- SetVarToObj(varPtr, varIndex, Tcl_NewLongObj(maxLong));
+ SetVarToObj(varPtr, varIndex, Tcl_NewWideIntObj(maxLong));
}
} else if (strcmp(subCmd, "ismaxlong") == 0) {
if (objc != 3) {
@@ -782,9 +782,9 @@ TestintobjCmd(
Tcl_AppendToObj(Tcl_GetObjResult(interp), "1", -1);
#else
if ((varPtr[varIndex] != NULL) && !Tcl_IsShared(varPtr[varIndex])) {
- Tcl_SetLongObj(varPtr[varIndex], LONG_MAX);
+ Tcl_SetWideIntObj(varPtr[varIndex], LONG_MAX);
} else {
- SetVarToObj(varPtr, varIndex, Tcl_NewLongObj(LONG_MAX));
+ SetVarToObj(varPtr, varIndex, Tcl_NewWideIntObj(LONG_MAX));
}
if (Tcl_GetIntFromObj(interp, varPtr[varIndex], &i) != TCL_OK) {
Tcl_ResetResult(interp);