diff options
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r-- | generic/tclExecute.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index b10af65..ff1da8b 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -2034,6 +2034,15 @@ TclNRExecuteByteCode( * sizeof(void *); int numWords = (size + sizeof(Tcl_Obj *) - 1) / sizeof(Tcl_Obj *); + /* + * Shortcut for compiled empty scripts + */ + + if (codePtr->source && (*codePtr->source == '\0') + && !(codePtr->flags & TCL_BYTECODE_PRECOMPILED)) { + return TCL_OK; + } + codePtr->refCount++; /* |