diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-21 09:29:57 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-21 09:29:57 (GMT) |
commit | 87e3de423c41172a8326e0312e4158cbc370b2dd (patch) | |
tree | a5ec1c37b02488159ae392ec679ca4d5ee941442 /generic/tclLiteral.c | |
parent | 56b804fc38c52b9fda67fb0a23ecc0e0c877ac1a (diff) | |
parent | 8d3c0c2e8152a4ce95d5f96680dca034fcfa0b6b (diff) | |
download | tcl-87e3de423c41172a8326e0312e4158cbc370b2dd.zip tcl-87e3de423c41172a8326e0312e4158cbc370b2dd.tar.gz tcl-87e3de423c41172a8326e0312e4158cbc370b2dd.tar.bz2 |
merge trunk
Diffstat (limited to 'generic/tclLiteral.c')
-rw-r--r-- | generic/tclLiteral.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index f96fb6d..1002efc 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -229,8 +229,7 @@ TclCreateLiteral( } /* - * The literal is new to the interpreter. Add it to the global literal - * table. + * The literal is new to the interpreter. */ TclNewObj(objPtr); @@ -241,8 +240,11 @@ TclCreateLiteral( TclInitStringRep(objPtr, bytes, length); } + /* Should the new literal be shared globally? */ + if ((flags & LITERAL_UNSHARED)) { /* + * No, do *not* add it the global literal table * Make clear, that no global value is returned */ if (globalPtrPtr != NULL) { @@ -251,6 +253,9 @@ TclCreateLiteral( return objPtr; } + /* + * Yes, add it to the global literal table. + */ #ifdef TCL_COMPILE_DEBUG if (LookupLiteralEntry((Tcl_Interp *) iPtr, objPtr) != NULL) { Tcl_Panic("%s: literal \"%.*s\" found globally but shouldn't be", |