From 76adf66e550eb63f49a19c9ada4e49123efea2ec Mon Sep 17 00:00:00 2001 From: andreask Date: Fri, 17 Feb 2012 17:12:32 +0000 Subject: Fix: Removed C99ism (in-block variable declaration) from commit [39f6ebe301] which prevents building with non-gcc compilers, notably AIX, HPUX, Solaris, MSVC6, possibly others. --- generic/tclCompile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- cgit v0.12