diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-10-11 10:28:31 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-10-11 10:28:31 (GMT) |
commit | 19fb4adbcae4d69d02133e44994a40964ed9940b (patch) | |
tree | ffa29c5eb416ef18bbbe9531e43a8ff488da8017 /generic | |
parent | 4ac2c6c6becc38819419d8383061b5369bdc59ea (diff) | |
parent | e5922ea9f58e980cfa34845031a5daa2202b0bd9 (diff) | |
download | tcl-19fb4adbcae4d69d02133e44994a40964ed9940b.zip tcl-19fb4adbcae4d69d02133e44994a40964ed9940b.tar.gz tcl-19fb4adbcae4d69d02133e44994a40964ed9940b.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclBasic.c | 7 | ||||
-rw-r--r-- | generic/tclIORChan.c | 9 | ||||
-rw-r--r-- | generic/tclIORTrans.c | 17 | ||||
-rw-r--r-- | generic/tclTest.c | 6 |
4 files changed, 23 insertions, 16 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 1c1556f..57f61d9 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -176,7 +176,7 @@ static int CancelEvalProc(void *clientData, Tcl_Interp *interp, int code); static int CheckDoubleResult(Tcl_Interp *interp, double dResult); static void DeleteCoroutine(void *clientData); -static void DeleteInterpProc(Tcl_Interp *interp); +static Tcl_FreeProc DeleteInterpProc; static void DeleteOpCmdClientData(void *clientData); #ifdef USE_DTRACE static Tcl_ObjCmdProc DTraceObjCmd; @@ -1802,7 +1802,7 @@ Tcl_DeleteInterp( * Ensure that the interpreter is eventually deleted. */ - Tcl_EventuallyFree(interp, (Tcl_FreeProc *) DeleteInterpProc); + Tcl_EventuallyFree(interp, DeleteInterpProc); } /* @@ -1828,8 +1828,9 @@ Tcl_DeleteInterp( static void DeleteInterpProc( - Tcl_Interp *interp) /* Interpreter to delete. */ + void *blockPtr) /* Interpreter to delete. */ { + Tcl_Interp *interp = (Tcl_Interp *) blockPtr; Interp *iPtr = (Interp *) interp; Tcl_HashEntry *hPtr; Tcl_HashSearch search; diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index f313ab7..63c8007 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -448,7 +448,7 @@ static Tcl_Obj * DecodeEventMask(int mask); static ReflectedChannel * NewReflectedChannel(Tcl_Interp *interp, Tcl_Obj *cmdpfxObj, int mode, Tcl_Obj *handleObj); static Tcl_Obj * NextHandle(void); -static void FreeReflectedChannel(ReflectedChannel *rcPtr); +static Tcl_FreeProc FreeReflectedChannel; static int InvokeTclMethod(ReflectedChannel *rcPtr, MethodName method, Tcl_Obj *argOneObj, Tcl_Obj *argTwoObj, Tcl_Obj **resultObjPtr); @@ -1230,7 +1230,7 @@ ReflectClose( if (rcPtr->writeTimer != NULL) { Tcl_DeleteTimerHandler(rcPtr->writeTimer); } - Tcl_EventuallyFree(rcPtr, (Tcl_FreeProc *) FreeReflectedChannel); + Tcl_EventuallyFree(rcPtr, FreeReflectedChannel); return EOK; } @@ -1305,7 +1305,7 @@ ReflectClose( if (rcPtr->writeTimer != NULL) { Tcl_DeleteTimerHandler(rcPtr->writeTimer); } - Tcl_EventuallyFree(rcPtr, (Tcl_FreeProc *) FreeReflectedChannel); + Tcl_EventuallyFree(rcPtr, FreeReflectedChannel); return (result == TCL_OK) ? EOK : EINVAL; } @@ -2318,8 +2318,9 @@ NextHandle(void) static void FreeReflectedChannel( - ReflectedChannel *rcPtr) + void *blockPtr) { + ReflectedChannel *rcPtr = (ReflectedChannel *) blockPtr; Channel *chanPtr = (Channel *) rcPtr->chan; TclChannelRelease((Tcl_Channel)chanPtr); diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index 90e7195..9328de8 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -413,7 +413,7 @@ static ReflectedTransform * NewReflectedTransform(Tcl_Interp *interp, Tcl_Obj *cmdpfxObj, int mode, Tcl_Obj *handleObj, Tcl_Channel parentChan); static Tcl_Obj * NextHandle(void); -static void FreeReflectedTransform(ReflectedTransform *rtPtr); +static Tcl_FreeProc FreeReflectedTransform; static void FreeReflectedTransformArgs(ReflectedTransform *rtPtr); static int InvokeTclMethod(ReflectedTransform *rtPtr, const char *method, Tcl_Obj *argOneObj, @@ -713,7 +713,7 @@ TclChanPushObjCmd( * structure. */ - Tcl_EventuallyFree(rtPtr, (Tcl_FreeProc *) FreeReflectedTransform); + Tcl_EventuallyFree(rtPtr, FreeReflectedTransform); return TCL_ERROR; #undef CHAN @@ -923,7 +923,7 @@ ReflectClose( } #endif /* TCL_THREADS */ - Tcl_EventuallyFree(rtPtr, (Tcl_FreeProc *) FreeReflectedTransform); + Tcl_EventuallyFree(rtPtr, FreeReflectedTransform); return EOK; } @@ -940,7 +940,7 @@ ReflectClose( #if TCL_THREADS if (rtPtr->thread != Tcl_GetCurrentThread()) { Tcl_EventuallyFree(rtPtr, - (Tcl_FreeProc *) FreeReflectedTransform); + FreeReflectedTransform); return errorCode; } #endif /* TCL_THREADS */ @@ -954,7 +954,7 @@ ReflectClose( #if TCL_THREADS if (rtPtr->thread != Tcl_GetCurrentThread()) { Tcl_EventuallyFree(rtPtr, - (Tcl_FreeProc *) FreeReflectedTransform); + FreeReflectedTransform); return errorCode; } #endif /* TCL_THREADS */ @@ -974,7 +974,7 @@ ReflectClose( ForwardOpToOwnerThread(rtPtr, ForwardedClose, &p); result = p.base.code; - Tcl_EventuallyFree(rtPtr, (Tcl_FreeProc *) FreeReflectedTransform); + Tcl_EventuallyFree(rtPtr, FreeReflectedTransform); if (result != TCL_OK) { PassReceivedErrorInterp(interp, &p); @@ -1033,7 +1033,7 @@ ReflectClose( #endif /* TCL_THREADS */ } - Tcl_EventuallyFree (rtPtr, (Tcl_FreeProc *) FreeReflectedTransform); + Tcl_EventuallyFree(rtPtr, FreeReflectedTransform); return errorCodeSet ? errorCode : ((result == TCL_OK) ? EOK : EINVAL); } @@ -1870,8 +1870,9 @@ FreeReflectedTransformArgs( static void FreeReflectedTransform( - ReflectedTransform *rtPtr) + void *blockPtr) { + ReflectedTransform *rtPtr = (ReflectedTransform *) blockPtr; TimerKill(rtPtr); ResultClear(&rtPtr->result); diff --git a/generic/tclTest.c b/generic/tclTest.c index a0de5ac..cad87e1 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -213,7 +213,7 @@ static Tcl_ObjCmdProc NoopObjCmd; static Tcl_CmdObjTraceProc ObjTraceProc; static void ObjTraceDeleteProc(void *clientData); static void PrintParse(Tcl_Interp *interp, Tcl_Parse *parsePtr); -static void SpecialFree(void *blockPtr); +static Tcl_FreeProc SpecialFree; static int StaticInitProc(Tcl_Interp *interp); static Tcl_CmdProc TestasyncCmd; static Tcl_ObjCmdProc TestbumpinterpepochObjCmd; @@ -2063,7 +2063,11 @@ TestdstringCmd( */ static void SpecialFree( +#if TCL_MAJOR_VERSION > 8 void *blockPtr /* Block to free. */ +#else + char *blockPtr /* Block to free. */ +#endif ) { Tcl_Free(((char *)blockPtr) - 16); } |