summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-11-16 11:17:54 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-11-16 11:17:54 (GMT)
commit5534478fa10a116663a3b05f32a119bb07aa9ed2 (patch)
treeb647149ae02bb75b31d2ac1b36cbd503bf42855c /generic/tclObj.c
parentde0ff2272ed178a1fba979435ced086cecb968fa (diff)
parent7dec4a7fc516a50bac5f55f6752b646254ba1082 (diff)
downloadtcl-5534478fa10a116663a3b05f32a119bb07aa9ed2.zip
tcl-5534478fa10a116663a3b05f32a119bb07aa9ed2.tar.gz
tcl-5534478fa10a116663a3b05f32a119bb07aa9ed2.tar.bz2
re-base "novem-more-memory-API" to trunk. TIP not submitted yet, but upcoming.
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r--generic/tclObj.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index ab259c2..53a3a406 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -1525,7 +1525,7 @@ int
TclObjBeingDeleted(
Tcl_Obj *objPtr)
{
- return (objPtr->length == -1);
+ return (objPtr->length == (size_t)-1);
}
/*
@@ -1690,7 +1690,7 @@ Tcl_GetStringFromObj(
(void) TclGetString(objPtr);
if (lengthPtr != NULL) {
- *lengthPtr = objPtr->length;
+ *lengthPtr = (objPtr->length < INT_MAX)? objPtr->length: INT_MAX;
}
return objPtr->bytes;
}
@@ -4474,7 +4474,7 @@ Tcl_RepresentationCmd(
descObj = Tcl_ObjPrintf("value is a %s with a refcount of %d,"
" object pointer at %p",
objv[1]->typePtr ? objv[1]->typePtr->name : "pure string",
- objv[1]->refCount, objv[1]);
+ (int) objv[1]->refCount, objv[1]);
if (objv[1]->typePtr) {
if (objv[1]->typePtr == &tclDoubleType) {