diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-01-04 11:14:59 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-01-04 11:14:59 (GMT) |
commit | 8ccae052467b3b4ef6a42321289d1a8535c858d5 (patch) | |
tree | a2ed642c38ff21ba7fd8a3a8b25f0407daa58114 /generic | |
parent | aa5bfc6d5bbe02732c290215d4f69c1f1ce37dda (diff) | |
parent | 09d1473b3be04898d6ec67abcad0b980fdd88df6 (diff) | |
download | tcl-8ccae052467b3b4ef6a42321289d1a8535c858d5.zip tcl-8ccae052467b3b4ef6a42321289d1a8535c858d5.tar.gz tcl-8ccae052467b3b4ef6a42321289d1a8535c858d5.tar.bz2 |
merge trunk
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclExecute.c | 14 | ||||
-rw-r--r-- | generic/tclInt.h | 1 | ||||
-rw-r--r-- | generic/tclUtil.c | 4 |
3 files changed, 16 insertions, 3 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 9fcc8a5..3635bab 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -1048,6 +1048,7 @@ GrowEvaluationStack( return MEMSTART(markerPtr); } } else { +#ifndef PURIFY Tcl_Obj **tmpMarkerPtr = esPtr->tosPtr + 1; int offset = OFFSET(tmpMarkerPtr); @@ -1064,6 +1065,7 @@ GrowEvaluationStack( *esPtr->markerPtr = (Tcl_Obj *) markerPtr; return memStart; } +#endif } /* @@ -1075,8 +1077,9 @@ GrowEvaluationStack( if (move) { moveWords = esPtr->tosPtr - MEMSTART(markerPtr) + 1; } - needed = growth + moveWords + WALLOCALIGN; + needed = growth + moveWords + WALLOCALIGN - 1; + /* * Check if there is enough room in the next stack (if there is one, it * should be both empty and the last one!) @@ -1106,10 +1109,15 @@ GrowEvaluationStack( * including the elements to be copied over and the new marker. */ +#ifndef PURIFY newElems = 2*currElems; while (needed > newElems) { newElems *= 2; } +#else + newElems = needed; +#endif + newBytes = sizeof(ExecStack) + (newElems-1) * sizeof(Tcl_Obj *); oldPtr = esPtr; @@ -1258,6 +1266,10 @@ TclStackFree( } if (esPtr->prevPtr) { eePtr->execStackPtr = esPtr->prevPtr; +#ifdef PURIFY + eePtr->execStackPtr->nextPtr = NULL; + DeleteExecStack(esPtr); +#endif } else { eePtr->execStackPtr = esPtr; } diff --git a/generic/tclInt.h b/generic/tclInt.h index f308a67..537afb3 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -4050,6 +4050,7 @@ typedef const char *TclDTraceStr; ckfree((char *) (objPtr)) #undef USE_THREAD_ALLOC +#undef USE_TCLALLOC #elif defined(TCL_THREADS) && defined(USE_THREAD_ALLOC) /* diff --git a/generic/tclUtil.c b/generic/tclUtil.c index ddf067b..27e2474 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -167,7 +167,7 @@ const Tcl_ObjType tclEndOffsetType = { * separating whitespace, or a string terminator. It is just another * character in a list element. * - * The interpretaton of a formatted substring as a list element follows rules + * The interpretation of a formatted substring as a list element follows rules * similar to the parsing of the words of a command in a Tcl script. Backslash * substitution plays a key role, and is defined exactly as it is in command * parsing. The same routine, TclParseBackslash() is used in both command @@ -179,7 +179,7 @@ const Tcl_ObjType tclEndOffsetType = { * Backslash substitution replaces an "escape sequence" of one or more * characters starting with * \u005c \ BACKSLASH - * with a single character. The one character escape sequent case happens only + * with a single character. The one character escape sequence case happens only * when BACKSLASH is the last character in the string. In all other cases, the * escape sequence is at least two characters long. * |