summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rw-r--r--unix/tclLoadDyld.c3
-rw-r--r--unix/tclUnixFCmd.c6
-rw-r--r--unix/tclUnixInit.c2
-rw-r--r--unix/tclUnixPipe.c5
4 files changed, 9 insertions, 7 deletions
diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c
index e998bf9..7d462da 100644
--- a/unix/tclLoadDyld.c
+++ b/unix/tclLoadDyld.c
@@ -292,8 +292,9 @@ TclpDlopen(
*loadHandle = newHandle;
result = TCL_OK;
} else {
- Tcl_Obj *errObj = Tcl_NewObj();
+ Tcl_Obj *errObj;
+ TclNewObj(errObj);
if (errMsg != NULL) {
Tcl_AppendToObj(errObj, errMsg, -1);
}
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index 9abd70a..8660818 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -1369,7 +1369,7 @@ GetGroupAttribute(
groupPtr = TclpGetGrGid(statBuf.st_gid);
if (groupPtr == NULL) {
- *attributePtrPtr = Tcl_NewIntObj((int) statBuf.st_gid);
+ TclNewIntObj(*attributePtrPtr, (int) statBuf.st_gid);
} else {
Tcl_DString ds;
const char *utf;
@@ -1423,7 +1423,7 @@ GetOwnerAttribute(
pwPtr = TclpGetPwUid(statBuf.st_uid);
if (pwPtr == NULL) {
- *attributePtrPtr = Tcl_NewIntObj((int) statBuf.st_uid);
+ TclNewIntObj(*attributePtrPtr, (int) statBuf.st_uid);
} else {
Tcl_DString ds;
@@ -2341,7 +2341,7 @@ GetUnixFileAttributes(
return TCL_ERROR;
}
- *attributePtrPtr = Tcl_NewIntObj((fileAttributes&attributeArray[objIndex])!=0);
+ TclNewIntObj(*attributePtrPtr, (fileAttributes&attributeArray[objIndex])!=0);
return TCL_OK;
}
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index d0f8521..72039ac 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -473,7 +473,7 @@ TclpInitLibraryPath(
const char *str;
Tcl_DString buffer;
- pathPtr = Tcl_NewObj();
+ TclNewObj(pathPtr);
/*
* Look for the library relative to the TCL_LIBRARY env variable. If the
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c
index b98ea26..d5cb765 100644
--- a/unix/tclUnixPipe.c
+++ b/unix/tclUnixPipe.c
@@ -229,9 +229,10 @@ TclpCreateTempFile(
Tcl_Obj *
TclpTempFileName(void)
{
- Tcl_Obj *retVal, *nameObj = Tcl_NewObj();
+ Tcl_Obj *retVal, *nameObj;
int fd;
+ TclNewObj(nameObj);
Tcl_IncrRefCount(nameObj);
fd = TclUnixOpenTemporaryFile(NULL, NULL, NULL, nameObj);
if (fd == -1) {
@@ -1284,7 +1285,7 @@ Tcl_PidObjCmd(
*/
pipePtr = Tcl_GetChannelInstanceData(chan);
- resultPtr = Tcl_NewObj();
+ TclNewObj(resultPtr);
for (i = 0; i < pipePtr->numPids; i++) {
Tcl_ListObjAppendElement(NULL, resultPtr,
Tcl_NewIntObj(PTR2INT(TclpGetPid(pipePtr->pidPtr[i]))));