summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-14 09:43:02 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-14 09:43:02 (GMT)
commitd970d6f3f67a50a0b71ef5d61f77c9353a09ef64 (patch)
tree1298898b4d6dbcfad6a81f976e9d5c9815472c89
parentcfc633e793bcf3f8419aac8b7084c13b2f8dbaa4 (diff)
parente3f7f1bad8178c56aa5e8ddb994c218c30ec0f45 (diff)
downloadtcl-d970d6f3f67a50a0b71ef5d61f77c9353a09ef64.zip
tcl-d970d6f3f67a50a0b71ef5d61f77c9353a09ef64.tar.gz
tcl-d970d6f3f67a50a0b71ef5d61f77c9353a09ef64.tar.bz2
Merge 8.7
-rw-r--r--generic/tclIORChan.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c
index 7c4b038..e50c96f 100644
--- a/generic/tclIORChan.c
+++ b/generic/tclIORChan.c
@@ -3128,16 +3128,17 @@ ForwardProc(
case ForwardedSeek: {
Tcl_Obj *offObj;
+ Tcl_Obj *baseObj;
TclNewIntObj(offObj, paramPtr->seek.offset);
- Tcl_Obj *baseObj = Tcl_NewStringObj(
- (paramPtr->seek.seekMode==SEEK_SET) ? "start" :
- (paramPtr->seek.seekMode==SEEK_CUR) ? "current" : "end", -1);
+ baseObj = Tcl_NewStringObj(
+ (paramPtr->seek.seekMode==SEEK_SET) ? "start" :
+ (paramPtr->seek.seekMode==SEEK_CUR) ? "current" : "end", -1);
- Tcl_IncrRefCount(offObj);
- Tcl_IncrRefCount(baseObj);
+ Tcl_IncrRefCount(offObj);
+ Tcl_IncrRefCount(baseObj);
- Tcl_Preserve(rcPtr);
+ Tcl_Preserve(rcPtr);
if (InvokeTclMethod(rcPtr, METH_SEEK, offObj, baseObj, &resObj)!=TCL_OK){
ForwardSetObjError(paramPtr, resObj);
paramPtr->seek.offset = -1;