summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-02-03 11:47:02 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-02-03 11:47:02 (GMT)
commite2779b6b41c0ecc07005f1da41c7b6aa5895ed36 (patch)
tree36ccb69442c2dafb739933698795c8c0c5fd2454 /generic/tclObj.c
parent680d27740a871cd27464c07ed2afee0f4104dbd4 (diff)
downloadtcl-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/tclObj.c')
-rw-r--r--generic/tclObj.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 90df579..1abbb31 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -49,7 +49,6 @@ Tcl_Mutex tclObjMutex;
*/
char tclEmptyString = '\0';
-char *tclEmptyStringRep = &tclEmptyString;
#if defined(TCL_MEM_DEBUG) && defined(TCL_THREADS)
/*
@@ -1060,7 +1059,7 @@ TclDbInitNewObj(
* debugging. */
{
objPtr->refCount = 0;
- objPtr->bytes = tclEmptyStringRep;
+ objPtr->bytes = &tclEmptyString;
objPtr->length = 0;
objPtr->typePtr = NULL;
@@ -3395,7 +3394,7 @@ GetBignumFromObj(
objPtr->internalRep.twoPtrValue.ptr2 = NULL;
objPtr->typePtr = NULL;
if (objPtr->bytes == NULL) {
- TclInitStringRep(objPtr, tclEmptyStringRep, 0);
+ TclInitStringRep(objPtr, &tclEmptyString, 0);
}
}
return TCL_OK;