diff options
Diffstat (limited to 'generic/tclDictObj.c')
-rw-r--r-- | generic/tclDictObj.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 508c2af..b33bb31 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -567,7 +567,7 @@ SetDictFromAny( const char *string; char *s; const char *elemStart, *nextElem; - int lenRemain, length, elemSize, hasBrace, result, isNew; + int lenRemain, length, elemSize, result, isNew; const char *limit; /* Points just after string's last byte. */ register const char *p; register Tcl_Obj *keyPtr, *valuePtr; @@ -649,8 +649,10 @@ SetDictFromAny( for (p = string, lenRemain = length; lenRemain > 0; p = nextElem, lenRemain = (limit - nextElem)) { + int literal; + result = TclFindElement(interp, p, lenRemain, - &elemStart, &nextElem, &elemSize, &hasBrace); + &elemStart, &nextElem, &elemSize, &literal); if (result != TCL_OK) { if (interp != NULL) { Tcl_SetErrorCode(interp, "TCL", "VALUE", "DICTIONARY", NULL); @@ -667,7 +669,7 @@ SetDictFromAny( */ s = ckalloc(elemSize + 1); - if (hasBrace) { + if (literal) { memcpy(s, elemStart, (size_t) elemSize); s[elemSize] = 0; } else { @@ -685,7 +687,7 @@ SetDictFromAny( } result = TclFindElement(interp, p, lenRemain, - &elemStart, &nextElem, &elemSize, &hasBrace); + &elemStart, &nextElem, &elemSize, &literal); if (result != TCL_OK) { if (interp != NULL) { Tcl_SetErrorCode(interp, "TCL", "VALUE", "DICTIONARY", NULL); @@ -703,7 +705,7 @@ SetDictFromAny( */ s = ckalloc(elemSize + 1); - if (hasBrace) { + if (literal) { memcpy(s, elemStart, (size_t) elemSize); s[elemSize] = 0; } else { |