summaryrefslogtreecommitdiffstats
path: root/generic/tclLiteral.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclLiteral.c')
-rw-r--r--generic/tclLiteral.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c
index 9922cec..49f21f2 100644
--- a/generic/tclLiteral.c
+++ b/generic/tclLiteral.c
@@ -234,7 +234,6 @@ TclCreateLiteral(
*/
TclNewObj(objPtr);
- Tcl_IncrRefCount(objPtr);
if ((flags & LITERAL_ON_HEAP)) {
objPtr->bytes = (char *) bytes;
objPtr->length = length;
@@ -261,6 +260,7 @@ TclCreateLiteral(
globalPtr = ckalloc(sizeof(LiteralEntry));
globalPtr->objPtr = objPtr;
+ Tcl_IncrRefCount(objPtr);
globalPtr->refCount = 1;
globalPtr->nsPtr = nsPtr;
globalPtr->nextPtr = globalTablePtr->buckets[globalHash];