summaryrefslogtreecommitdiffstats
path: root/tools
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 /tools
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 'tools')
-rw-r--r--tools/tsdPerf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/tsdPerf.c b/tools/tsdPerf.c
index a75e962..7a599e0 100644
--- a/tools/tsdPerf.c
+++ b/tools/tsdPerf.c
@@ -5,21 +5,21 @@ extern DLLEXPORT Tcl_PackageInitProc Tsdperf_Init;
static Tcl_ThreadDataKey key;
typedef struct {
- int value;
+ Tcl_WideInt value;
} TsdPerf;
static int
tsdPerfSetObjCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) {
TsdPerf *perf = Tcl_GetThreadData(&key, sizeof(TsdPerf));
- int i;
+ Tcl_WideInt i;
if (2 != objc) {
Tcl_WrongNumArgs(interp, 1, objv, "value");
return TCL_ERROR;
}
- if (TCL_OK != Tcl_GetIntFromObj(interp, objv[1], &i)) {
+ if (TCL_OK != Tcl_GetWideIntFromObj(interp, objv[1], &i)) {
return TCL_ERROR;
}
@@ -33,7 +33,7 @@ tsdPerfGetObjCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const
TsdPerf *perf = Tcl_GetThreadData(&key, sizeof(TsdPerf));
- Tcl_SetObjResult(interp, Tcl_NewIntObj(perf->value));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(perf->value));
return TCL_OK;
}