diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-12 19:38:33 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-12 19:38:33 (GMT) |
commit | 1961633531b70d5a6e627f86153f4d15e722ea8b (patch) | |
tree | ae45ec4f7d15560e77c426d92540667e45095d50 /generic/tclUtil.c | |
parent | 00268d4ae68741fdbf73a54412cd38648f9d7302 (diff) | |
download | tcl-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/tclUtil.c')
-rw-r--r-- | generic/tclUtil.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c index a56a99a..4c16c1f 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -2016,7 +2016,7 @@ Tcl_Concat( * All element bytes + (argc - 1) spaces + 1 terminating NULL. */ - result = ckalloc((unsigned) (bytesNeeded + argc)); + result = ckalloc(bytesNeeded + argc); for (p = result, i = 0; i < argc; i++) { int triml, trimr, elemLength; @@ -3104,7 +3104,7 @@ Tcl_DStringGetResult( dsPtr->spaceAvl = dsPtr->length+1; } else { dsPtr->string = ckalloc(dsPtr->length+1); - memcpy(dsPtr->string, iPtr->result, (unsigned) dsPtr->length+1); + memcpy(dsPtr->string, iPtr->result, dsPtr->length+1); iPtr->freeProc(iPtr->result); } dsPtr->spaceAvl = dsPtr->length+1; @@ -3117,7 +3117,7 @@ Tcl_DStringGetResult( dsPtr->string = ckalloc(dsPtr->length+1); dsPtr->spaceAvl = dsPtr->length + 1; } - memcpy(dsPtr->string, iPtr->result, (unsigned) dsPtr->length+1); + memcpy(dsPtr->string, iPtr->result, dsPtr->length+1); } iPtr->result = iPtr->resultSpace; @@ -3470,7 +3470,7 @@ TclPrecTraceProc( if (flags & TCL_TRACE_READS) { - Tcl_SetVar2Ex(interp, name1, name2, Tcl_NewIntObj(*precisionPtr), + Tcl_SetVar2Ex(interp, name1, name2, Tcl_NewWideIntObj(*precisionPtr), flags & TCL_GLOBAL_ONLY); return NULL; } |