diff options
| -rw-r--r-- | generic/tclCompile.c | 4 | ||||
| -rw-r--r-- | generic/tclEncoding.c | 4 | ||||
| -rw-r--r-- | generic/tclUtil.c | 6 | ||||
| -rw-r--r-- | tests/compile.test | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 2e591e4..9c887e4 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -2164,7 +2164,7 @@ TclCompileScript( if (envPtr->iPtr == NULL) { Tcl_Panic("TclCompileScript() called on uninitialized CompileEnv"); } - /* + /* * Check depth to avoid overflow of the C execution stack by too many * nested calls of TclCompileScript (considering interp recursionlimit). * Factor 5/4 (1.25) is used to avoid too mistaken limit recognition @@ -2256,7 +2256,7 @@ TclCompileScript( continue; } - /* + /* * Avoid stack exhaustion by too many nested calls of TclCompileScript * (considering interp recursionlimit). */ diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index a88c1a7..645df20 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -3123,6 +3123,7 @@ Iso88591FromUtfProc( const char *srcStart, *srcEnd, *srcClose; const char *dstStart, *dstEnd; int result, numChars; + Tcl_UniChar ch = 0; result = TCL_OK; @@ -3137,7 +3138,6 @@ Iso88591FromUtfProc( dstEnd = dst + dstLen - 1; for (numChars = 0; src < srcEnd; numChars++) { - Tcl_UniChar ch = 0; int len; if ((src > srcClose) && (!Tcl_UtfCharComplete(src, srcEnd - src))) { @@ -3490,6 +3490,7 @@ EscapeFromUtfProc( const TableEncodingData *tableDataPtr; const char *tablePrefixBytes; const unsigned short *const *tableFromUnicode; + Tcl_UniChar ch = 0; result = TCL_OK; @@ -3530,7 +3531,6 @@ EscapeFromUtfProc( for (numChars = 0; src < srcEnd; numChars++) { unsigned len; int word; - Tcl_UniChar ch = 0; if ((src > srcClose) && (!Tcl_UtfCharComplete(src, srcEnd - src))) { /* diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 8bf3eb3..c5c816f 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -4399,7 +4399,7 @@ TclSetProcessGlobalValue( Tcl_IncrRefCount(newValue); cacheMap = GetThreadHash(&pgvPtr->key); ClearHash(cacheMap); - hPtr = Tcl_CreateHashEntry(cacheMap, (void *)(size_t)(pgvPtr->epoch), &dummy); + hPtr = Tcl_CreateHashEntry(cacheMap, INT2PTR(pgvPtr->epoch), &dummy); Tcl_SetHashValue(hPtr, newValue); Tcl_MutexUnlock(&pgvPtr->mutex); } @@ -4459,7 +4459,7 @@ TclGetProcessGlobalValue( } } cacheMap = GetThreadHash(&pgvPtr->key); - hPtr = Tcl_FindHashEntry(cacheMap, (void *)(size_t)epoch); + hPtr = Tcl_FindHashEntry(cacheMap, INT2PTR(epoch)); if (NULL == hPtr) { int dummy; @@ -4492,7 +4492,7 @@ TclGetProcessGlobalValue( value = Tcl_NewStringObj(pgvPtr->value, pgvPtr->numBytes); hPtr = Tcl_CreateHashEntry(cacheMap, - (void *)(size_t)(pgvPtr->epoch), &dummy); + INT2PTR(pgvPtr->epoch), &dummy); Tcl_MutexUnlock(&pgvPtr->mutex); Tcl_SetHashValue(hPtr, value); Tcl_IncrRefCount(value); diff --git a/tests/compile.test b/tests/compile.test index 9ca3cc6..4d57549 100644 --- a/tests/compile.test +++ b/tests/compile.test @@ -508,7 +508,7 @@ test compile-13.3 {TclCompileScript: testing check of max depth by nested script ti eval {set result {}} } -body { # Test different compilation variants (instructions evalStk, invokeStk, etc), - # with 500 nested scripts (bodies). It must generate "too many nested compilations" + # with 500 nested scripts (bodies). It must generate "too many nested compilations" # error for any variant we're testing here: ti eval {foreach cmd {eval "if 1" try catch} { set c [gencode [expr {![info exists ::tcl_platform(debug)] ? 2000 : 1000}] $cmd] @@ -516,7 +516,7 @@ test compile-13.3 {TclCompileScript: testing check of max depth by nested script }} #puts $errors # all of nested calls exceed the limit, so must end with "too many nested compilations" - # (or evaluations, depending on compile method/instruction and "mixed" compile within + # (or evaluations, depending on compile method/instruction and "mixed" compile within # evaliation), so no one succeeds, the result must be empty: ti eval {set result} } -result {} |
