summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-13 14:59:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-13 14:59:43 (GMT)
commit3fc1392c92078e35e6a35efc90ce598c1c2fc192 (patch)
tree5b6f3de70fca08f3638540445bd5f25b522f87b6 /generic/tclCmdMZ.c
parent81e7623b785648f4b7c7ffdd8f1647c876bd4c45 (diff)
downloadtcl-3fc1392c92078e35e6a35efc90ce598c1c2fc192.zip
tcl-3fc1392c92078e35e6a35efc90ce598c1c2fc192.tar.gz
tcl-3fc1392c92078e35e6a35efc90ce598c1c2fc192.tar.bz2
More usage of TclNewObj() in stead of Tcl_NewObj() and TclNewIntObj() in stead of Tcl_NewIntObj()
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r--generic/tclCmdMZ.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index b24cb97..081b036 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -357,7 +357,7 @@ Tcl_RegexpObjCmd(
objc = info.nsubs + 1;
if (all <= 1) {
- resultPtr = Tcl_NewObj();
+ TclNewObj(resultPtr);
}
}
for (i = 0; i < objc; i++) {
@@ -399,7 +399,7 @@ Tcl_RegexpObjCmd(
offset + info.matches[i].start,
offset + info.matches[i].end - 1);
} else {
- newPtr = Tcl_NewObj();
+ TclNewObj(newPtr);
}
}
if (doinline) {
@@ -1058,7 +1058,7 @@ Tcl_SplitObjCmd(
stringPtr = TclGetStringFromObj(objv[1], &stringLen);
end = stringPtr + stringLen;
- listPtr = Tcl_NewObj();
+ TclNewObj(listPtr);
if (stringLen == 0) {
/*
@@ -3915,7 +3915,8 @@ TclNRSwitchObjCmd(
rangeObjAry[0] = Tcl_NewLongObj(info.matches[j].start);
rangeObjAry[1] = Tcl_NewLongObj(info.matches[j].end-1);
} else {
- rangeObjAry[0] = rangeObjAry[1] = Tcl_NewIntObj(-1);
+ TclNewIntObj(rangeObjAry[1], -1);
+ rangeObjAry[0] = rangeObjAry[1];
}
/*
@@ -4857,7 +4858,7 @@ TclNRTryObjCmd(
return TCL_ERROR;
}
bodyObj = objv[1];
- handlersObj = Tcl_NewObj();
+ TclNewObj(handlersObj);
bodyShared = 0;
haveHandlers = 0;
for (i=2 ; i<objc ; i++) {