diff options
Diffstat (limited to 'generic/tclIORChan.c')
-rw-r--r-- | generic/tclIORChan.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 8a5675a..c622afa 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -1365,7 +1365,7 @@ ReflectInput( Tcl_Preserve(rcPtr); - toReadObj = Tcl_NewIntObj(toRead); + TclNewIntObj(toReadObj, toRead); Tcl_IncrRefCount(toReadObj); if (InvokeTclMethod(rcPtr, METH_READ, toReadObj, NULL, &resObj)!=TCL_OK) { @@ -3047,8 +3047,10 @@ ForwardProc( } case ForwardedInput: { - Tcl_Obj *toReadObj = Tcl_NewIntObj(paramPtr->input.toRead); - Tcl_IncrRefCount(toReadObj); + Tcl_Obj *toReadObj; + + TclNewIntObj(toReadObj, paramPtr->input.toRead); + Tcl_IncrRefCount(toReadObj); Tcl_Preserve(rcPtr); if (InvokeTclMethod(rcPtr, METH_READ, toReadObj, NULL, &resObj)!=TCL_OK){ |