diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-02-03 11:47:02 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-02-03 11:47:02 (GMT) |
commit | e2779b6b41c0ecc07005f1da41c7b6aa5895ed36 (patch) | |
tree | 36ccb69442c2dafb739933698795c8c0c5fd2454 /generic/tclUtil.c | |
parent | 680d27740a871cd27464c07ed2afee0f4104dbd4 (diff) | |
download | tcl-e2779b6b41c0ecc07005f1da41c7b6aa5895ed36.zip tcl-e2779b6b41c0ecc07005f1da41c7b6aa5895ed36.tar.gz tcl-e2779b6b41c0ecc07005f1da41c7b6aa5895ed36.tar.bz2 |
In TclGetNumberFromObj() macro (tclExecute.c): Don't fill in type if TCL_ERROR is returned: The caller doesn't do anything with this.
Don't access (non-const) variable tclEmptyStringRep any more, use its value (&tclEmptyString) directly. Only keep it in tclPkg.c, for error checking.
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r-- | generic/tclUtil.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c index ba709cc..a4d523a 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -1384,7 +1384,7 @@ TclConvertElement( */ if ((src == NULL) || (length == 0) || (*src == '\0' && length == -1)) { - src = tclEmptyStringRep; + src = &tclEmptyString; length = 0; conversion = CONVERT_BRACE; } @@ -2954,7 +2954,7 @@ Tcl_DStringGetResult( if (!iPtr->result[0] && iPtr->objResultPtr && !Tcl_IsShared(iPtr->objResultPtr)) { - if (iPtr->objResultPtr->bytes == tclEmptyStringRep) { + if (iPtr->objResultPtr->bytes == &tclEmptyString) { dsPtr->string = dsPtr->staticSpace; dsPtr->string[0] = 0; dsPtr->length = 0; @@ -2964,7 +2964,7 @@ Tcl_DStringGetResult( dsPtr->length = iPtr->objResultPtr->length; dsPtr->spaceAvl = dsPtr->length + 1; TclFreeIntRep(iPtr->objResultPtr); - iPtr->objResultPtr->bytes = tclEmptyStringRep; + iPtr->objResultPtr->bytes = &tclEmptyString; iPtr->objResultPtr->length = 0; } return; |