diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-17 14:12:55 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-17 14:12:55 (GMT) |
commit | be275081a1ef4cf0490a07d2e253ca901d932fe8 (patch) | |
tree | 6bd1b9d196a5924bc9e00578719d36ef22f2eafd /generic/tclIOCmd.c | |
parent | 0a36b1187dcef39b41d28a5ce319aa7c54f56f66 (diff) | |
parent | 733b7a43a45ee6be75ccd99172f66b35b69841c5 (diff) | |
download | tcl-be275081a1ef4cf0490a07d2e253ca901d932fe8.zip tcl-be275081a1ef4cf0490a07d2e253ca901d932fe8.tar.gz tcl-be275081a1ef4cf0490a07d2e253ca901d932fe8.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic/tclIOCmd.c')
-rw-r--r-- | generic/tclIOCmd.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index d2f38ff..31134fe 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -301,7 +301,7 @@ Tcl_GetsObjCmd( } TclChannelPreserve(chan); - linePtr = Tcl_NewObj(); + TclNewObj(linePtr); lineLen = Tcl_GetsObj(chan, linePtr); if (lineLen < 0) { if (!Tcl_Eof(chan) && !Tcl_InputBlocked(chan)) { @@ -330,7 +330,7 @@ Tcl_GetsObjCmd( code = TCL_ERROR; goto done; } - Tcl_SetObjResult(interp, Tcl_NewIntObj(lineLen)); + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(lineLen)); } else { Tcl_SetObjResult(interp, linePtr); } @@ -426,7 +426,7 @@ Tcl_ReadObjCmd( } } - resultPtr = Tcl_NewObj(); + TclNewObj(resultPtr); Tcl_IncrRefCount(resultPtr); TclChannelPreserve(chan); charactersRead = Tcl_ReadChars(chan, resultPtr, toRead, 0); @@ -948,7 +948,7 @@ Tcl_ExecObjCmd( return TCL_OK; } - resultPtr = Tcl_NewObj(); + TclNewObj(resultPtr); if (Tcl_GetChannelHandle(chan, TCL_READABLE, NULL) == TCL_OK) { if (Tcl_ReadChars(chan, resultPtr, -1, 0) == TCL_IO_FAILURE) { /* @@ -1336,7 +1336,7 @@ AcceptCallbackProc( Tcl_ListObjAppendElement(NULL, objv[1], Tcl_NewStringObj( Tcl_GetChannelName(chan), -1)); Tcl_ListObjAppendElement(NULL, objv[1], Tcl_NewStringObj(address, -1)); - Tcl_ListObjAppendElement(NULL, objv[1], Tcl_NewIntObj(port)); + Tcl_ListObjAppendElement(NULL, objv[1], Tcl_NewWideIntObj(port)); script = Tcl_ConcatObj(2, objv); Tcl_IncrRefCount(script); @@ -1798,16 +1798,16 @@ ChanPendingObjCmd( switch ((enum options) index) { case PENDING_INPUT: if (!(mode & TCL_READABLE)) { - Tcl_SetObjResult(interp, Tcl_NewIntObj(-1)); + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(-1)); } else { - Tcl_SetObjResult(interp, Tcl_NewIntObj(Tcl_InputBuffered(chan))); + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(Tcl_InputBuffered(chan))); } break; case PENDING_OUTPUT: if (!(mode & TCL_WRITABLE)) { - Tcl_SetObjResult(interp, Tcl_NewIntObj(-1)); + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(-1)); } else { - Tcl_SetObjResult(interp, Tcl_NewIntObj(Tcl_OutputBuffered(chan))); + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(Tcl_OutputBuffered(chan))); } break; } @@ -1927,7 +1927,7 @@ ChanPipeObjCmd( channelNames[0] = Tcl_GetChannelName(rchan); channelNames[1] = Tcl_GetChannelName(wchan); - resultPtr = Tcl_NewObj(); + TclNewObj(resultPtr); Tcl_ListObjAppendElement(NULL, resultPtr, Tcl_NewStringObj(channelNames[0], -1)); Tcl_ListObjAppendElement(NULL, resultPtr, |