diff options
author | andreask <andreask> | 2012-02-17 17:12:32 (GMT) |
---|---|---|
committer | andreask <andreask> | 2012-02-17 17:12:32 (GMT) |
commit | 76adf66e550eb63f49a19c9ada4e49123efea2ec (patch) | |
tree | 8385a257c88c99182bada5df7395d8fd41dc5f93 | |
parent | 6df0a0efa540b67adb5a9d1bb2c5f58f8f656e23 (diff) | |
download | tcl-76adf66e550eb63f49a19c9ada4e49123efea2ec.zip tcl-76adf66e550eb63f49a19c9ada4e49123efea2ec.tar.gz tcl-76adf66e550eb63f49a19c9ada4e49123efea2ec.tar.bz2 |
Fix: Removed C99ism (in-block variable declaration) from commit [39f6ebe301] which prevents building with non-gcc compilers, notably AIX, HPUX, Solaris, MSVC6, possibly others.
-rw-r--r-- | generic/tclCompile.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 59d1fbf..9b23389 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -4091,11 +4091,13 @@ RecordByteCodeStats( * to add to accumulated statistics. */ { Interp *iPtr = (Interp *) *codePtr->interpHandle; + register ByteCodeStats *statsPtr; + if (iPtr == NULL) { /* Avoid segfaulting in case we're called in a deleted interp */ return; } - register ByteCodeStats *statsPtr = &(iPtr->stats); + statsPtr = &(iPtr->stats); statsPtr->numCompilations++; statsPtr->totalSrcBytes += (double) codePtr->numSrcBytes; |