diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-12 19:38:33 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-12 19:38:33 (GMT) |
| commit | 1961633531b70d5a6e627f86153f4d15e722ea8b (patch) | |
| tree | ae45ec4f7d15560e77c426d92540667e45095d50 /unix/tclUnixPipe.c | |
| parent | 00268d4ae68741fdbf73a54412cd38648f9d7302 (diff) | |
| download | tcl-1961633531b70d5a6e627f86153f4d15e722ea8b.zip tcl-1961633531b70d5a6e627f86153f4d15e722ea8b.tar.gz tcl-1961633531b70d5a6e627f86153f4d15e722ea8b.tar.bz2 | |
If compiled with -DTCL_NO_DEPRECATED, remove Tcl_NewIntObj/Tcl_NewLongObj/Tcl_DbNewLongObj from stub table, as they will be gone in 9.0 (converted to a macro)
Use Tcl_WideInt's directly in more places, diminishing the possibility of inadvent overflow.
Diffstat (limited to 'unix/tclUnixPipe.c')
| -rw-r--r-- | unix/tclUnixPipe.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index be7b4eb..93faec8 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -872,7 +872,7 @@ TclGetAndDetachPids( pipePtr = Tcl_GetChannelInstanceData(chan); TclNewObj(pidsObj); for (i = 0; i < pipePtr->numPids; i++) { - Tcl_ListObjAppendElement(NULL, pidsObj, Tcl_NewIntObj( + Tcl_ListObjAppendElement(NULL, pidsObj, Tcl_NewWideIntObj( PTR2INT(pipePtr->pidPtr[i]))); Tcl_DetachPids(1, &pipePtr->pidPtr[i]); } @@ -1268,7 +1268,7 @@ Tcl_PidObjCmd( } if (objc == 1) { - Tcl_SetObjResult(interp, Tcl_NewLongObj((long) getpid())); + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(getpid())); } else { /* * Get the channel and make sure that it refers to a pipe. @@ -1290,7 +1290,7 @@ Tcl_PidObjCmd( resultPtr = Tcl_NewObj(); for (i = 0; i < pipePtr->numPids; i++) { Tcl_ListObjAppendElement(NULL, resultPtr, - Tcl_NewIntObj(PTR2INT(TclpGetPid(pipePtr->pidPtr[i])))); + Tcl_NewWideIntObj(PTR2INT(TclpGetPid(pipePtr->pidPtr[i])))); } Tcl_SetObjResult(interp, resultPtr); } |
