summaryrefslogtreecommitdiffstats
path: root/generic/tclBinary.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-17 14:12:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-17 14:12:55 (GMT)
commitbe275081a1ef4cf0490a07d2e253ca901d932fe8 (patch)
tree6bd1b9d196a5924bc9e00578719d36ef22f2eafd /generic/tclBinary.c
parent0a36b1187dcef39b41d28a5ce319aa7c54f56f66 (diff)
parent733b7a43a45ee6be75ccd99172f66b35b69841c5 (diff)
downloadtcl-be275081a1ef4cf0490a07d2e253ca901d932fe8.zip
tcl-be275081a1ef4cf0490a07d2e253ca901d932fe8.tar.gz
tcl-be275081a1ef4cf0490a07d2e253ca901d932fe8.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclBinary.c')
-rw-r--r--generic/tclBinary.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index 18cb2f1..3d12e24 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -1162,7 +1162,7 @@ BinaryFormatCmd(
* bytes and filling with nulls.
*/
- resultPtr = Tcl_NewObj();
+ TclNewObj(resultPtr);
buffer = Tcl_SetByteArrayLength(resultPtr, length);
memset(buffer, 0, length);
@@ -1595,7 +1595,7 @@ BinaryScanCmd(
}
}
src = buffer + offset;
- valuePtr = Tcl_NewObj();
+ TclNewObj(valuePtr);
Tcl_SetObjLength(valuePtr, count);
dest = TclGetString(valuePtr);
@@ -1650,7 +1650,7 @@ BinaryScanCmd(
}
}
src = buffer + offset;
- valuePtr = Tcl_NewObj();
+ TclNewObj(valuePtr);
Tcl_SetObjLength(valuePtr, count);
dest = TclGetString(valuePtr);
@@ -1734,7 +1734,7 @@ BinaryScanCmd(
if ((length - offset) < (count * size)) {
goto done;
}
- valuePtr = Tcl_NewObj();
+ TclNewObj(valuePtr);
src = buffer + offset;
for (i = 0; (size_t)i < count; i++) {
elementPtr = ScanNumber(src, cmd, flags, &numberCachePtr);
@@ -2376,8 +2376,9 @@ ScanNumber(
return (Tcl_Obj *)Tcl_GetHashValue(hPtr);
}
if (tablePtr->numEntries <= BINARY_SCAN_MAX_CACHE) {
- Tcl_Obj *objPtr = Tcl_NewWideIntObj(value);
+ Tcl_Obj *objPtr;
+ TclNewIntObj(objPtr, value);
Tcl_IncrRefCount(objPtr);
Tcl_SetHashValue(hPtr, objPtr);
return objPtr;
@@ -2763,7 +2764,7 @@ BinaryEncode64(
maxlen = 0;
}
- resultObj = Tcl_NewObj();
+ TclNewObj(resultObj);
data = TclGetByteArrayFromObj(objv[objc - 1], &count);
if (count > 0) {
unsigned char *cursor = NULL;
@@ -2915,7 +2916,7 @@ BinaryEncodeUu(
* enough".
*/
- resultObj = Tcl_NewObj();
+ TclNewObj(resultObj);
offset = 0;
data = TclGetByteArrayFromObj(objv[objc - 1], &count);
rawLength = (lineLength - 1) * 3 / 4;