Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Merge 8.6 |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | core-8-branch |
Files: | files | file ages | folders |
SHA3-256: |
56cb488cc3d4d1920645b16581c117f6 |
User & Date: | jan.nijtmans 2023-10-11 10:05:30.490 |
Context
2023-10-11
| ||
17:19 | Minor source readability and delete obsolete code check-in: f2b93e95e4 user: apnadkarni tags: core-8-branch | |
10:28 | Merge 8.7 check-in: a19b5c1f83 user: jan.nijtmans tags: trunk, main | |
10:05 | Merge 8.6 check-in: 56cb488cc3 user: jan.nijtmans tags: core-8-branch | |
09:45 | Fix [8ab8a138c9]: Functions passed to Tcl_EventuallyFree() must be declared/defined as Tcl_FreeProc check-in: df7a3fd9e1 user: jan.nijtmans tags: core-8-6-branch | |
04:53 | Minor nmake tweaks, remove obsolete target check-in: 927aa4937c user: apnadkarni tags: core-8-branch | |
Changes
Changes to generic/tclBasic.c.
︙ | ︙ | |||
184 185 186 187 188 189 190 | static char * CallCommandTraces(Interp *iPtr, Command *cmdPtr, const char *oldName, const char *newName, int flags); static int CancelEvalProc(void *clientData, Tcl_Interp *interp, int code); static int CheckDoubleResult(Tcl_Interp *interp, double dResult); static void DeleteCoroutine(void *clientData); | | | 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | static char * CallCommandTraces(Interp *iPtr, Command *cmdPtr, const char *oldName, const char *newName, int flags); static int CancelEvalProc(void *clientData, Tcl_Interp *interp, int code); static int CheckDoubleResult(Tcl_Interp *interp, double dResult); static void DeleteCoroutine(void *clientData); static Tcl_FreeProc DeleteInterpProc; static void DeleteOpCmdClientData(void *clientData); #ifdef USE_DTRACE static Tcl_ObjCmdProc DTraceObjCmd; static Tcl_NRPostProc DTraceCmdReturn; #else # define DTraceCmdReturn NULL #endif /* USE_DTRACE */ |
︙ | ︙ | |||
1826 1827 1828 1829 1830 1831 1832 | iPtr->flags |= DELETED; iPtr->compileEpoch++; /* * Ensure that the interpreter is eventually deleted. */ | | | 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 | iPtr->flags |= DELETED; iPtr->compileEpoch++; /* * Ensure that the interpreter is eventually deleted. */ Tcl_EventuallyFree(interp, DeleteInterpProc); } /* *---------------------------------------------------------------------- * * DeleteInterpProc -- * |
︙ | ︙ | |||
1852 1853 1854 1855 1856 1857 1858 | * by the interpreter. * *---------------------------------------------------------------------- */ static void DeleteInterpProc( | | > | 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 | * by the interpreter. * *---------------------------------------------------------------------- */ static void DeleteInterpProc( char *blockPtr) /* Interpreter to delete. */ { Tcl_Interp *interp = (Tcl_Interp *) blockPtr; Interp *iPtr = (Interp *) interp; Tcl_HashEntry *hPtr; Tcl_HashSearch search; Tcl_HashTable *hTablePtr; ResolverScheme *resPtr, *nextResPtr; Tcl_Size i; |
︙ | ︙ |
Changes to generic/tclDecls.h.
︙ | ︙ | |||
4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 | # undef Tcl_ObjSetVar2 # undef Tcl_StaticLibrary # define Tcl_CreateInterp() (tclStubsPtr->tcl_CreateInterp()) # define Tcl_GetStringResult(interp) (tclStubsPtr->tcl_GetStringResult(interp)) # define Tcl_Init(interp) (tclStubsPtr->tcl_Init(interp)) # define Tcl_ObjSetVar2(interp, part1, part2, newValue, flags) \ (tclStubsPtr->tcl_ObjSetVar2(interp, part1, part2, newValue, flags)) #endif #if defined(_WIN32) && defined(UNICODE) # if defined(TCL_NO_DEPRECATED) # define Tcl_FindExecutable(arg) ((Tcl_FindExecutable)((const char *)(arg))) # else # define Tcl_FindExecutable(arg) ((void)((Tcl_FindExecutable)((const char *)(arg)))) | > > > > > > | 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 | # undef Tcl_ObjSetVar2 # undef Tcl_StaticLibrary # define Tcl_CreateInterp() (tclStubsPtr->tcl_CreateInterp()) # define Tcl_GetStringResult(interp) (tclStubsPtr->tcl_GetStringResult(interp)) # define Tcl_Init(interp) (tclStubsPtr->tcl_Init(interp)) # define Tcl_ObjSetVar2(interp, part1, part2, newValue, flags) \ (tclStubsPtr->tcl_ObjSetVar2(interp, part1, part2, newValue, flags)) # undef Tcl_EventuallyFree # define Tcl_EventuallyFree \ ((void (*)(void *,void *))(void *)(tclStubsPtr->tcl_EventuallyFree)) /* 132 */ # undef Tcl_SetResult # define Tcl_SetResult \ ((void (*)(Tcl_Interp *, char *, void *))(void *)(tclStubsPtr->tcl_SetResult)) /* 232 */ #endif #if defined(_WIN32) && defined(UNICODE) # if defined(TCL_NO_DEPRECATED) # define Tcl_FindExecutable(arg) ((Tcl_FindExecutable)((const char *)(arg))) # else # define Tcl_FindExecutable(arg) ((void)((Tcl_FindExecutable)((const char *)(arg)))) |
︙ | ︙ |
Changes to generic/tclIORChan.c.
︙ | ︙ | |||
452 453 454 455 456 457 458 | static int EncodeEventMask(Tcl_Interp *interp, const char *objName, Tcl_Obj *obj, int *mask); 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); | | | 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 | static int EncodeEventMask(Tcl_Interp *interp, const char *objName, Tcl_Obj *obj, int *mask); 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 Tcl_FreeProc FreeReflectedChannel; static int InvokeTclMethod(ReflectedChannel *rcPtr, MethodName method, Tcl_Obj *argOneObj, Tcl_Obj *argTwoObj, Tcl_Obj **resultObjPtr); static ReflectedChannelMap * GetReflectedChannelMap(Tcl_Interp *interp); static Tcl_InterpDeleteProc DeleteReflectedChannelMap; static int ErrnoReturn(ReflectedChannel *rcPtr, Tcl_Obj *resObj); |
︙ | ︙ | |||
1233 1234 1235 1236 1237 1238 1239 | } if (rcPtr->readTimer != NULL) { Tcl_DeleteTimerHandler(rcPtr->readTimer); } if (rcPtr->writeTimer != NULL) { Tcl_DeleteTimerHandler(rcPtr->writeTimer); } | | | 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 | } if (rcPtr->readTimer != NULL) { Tcl_DeleteTimerHandler(rcPtr->readTimer); } if (rcPtr->writeTimer != NULL) { Tcl_DeleteTimerHandler(rcPtr->writeTimer); } Tcl_EventuallyFree(rcPtr, FreeReflectedChannel); return EOK; } /* * Are we in the correct thread? */ |
︙ | ︙ | |||
1308 1309 1310 1311 1312 1313 1314 | } if (rcPtr->readTimer != NULL) { Tcl_DeleteTimerHandler(rcPtr->readTimer); } if (rcPtr->writeTimer != NULL) { Tcl_DeleteTimerHandler(rcPtr->writeTimer); } | | | 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 | } if (rcPtr->readTimer != NULL) { Tcl_DeleteTimerHandler(rcPtr->readTimer); } if (rcPtr->writeTimer != NULL) { Tcl_DeleteTimerHandler(rcPtr->writeTimer); } Tcl_EventuallyFree(rcPtr, FreeReflectedChannel); return (result == TCL_OK) ? EOK : EINVAL; } /* *---------------------------------------------------------------------- * * ReflectInput -- |
︙ | ︙ | |||
2338 2339 2340 2341 2342 2343 2344 | Tcl_MutexUnlock(&rcCounterMutex); return resObj; } static void FreeReflectedChannel( | | > | 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 | Tcl_MutexUnlock(&rcCounterMutex); return resObj; } static void FreeReflectedChannel( char *blockPtr) { ReflectedChannel *rcPtr = (ReflectedChannel *) blockPtr; Channel *chanPtr = (Channel *) rcPtr->chan; TclChannelRelease((Tcl_Channel)chanPtr); if (rcPtr->name) { Tcl_DecrRefCount(rcPtr->name); } if (rcPtr->methods) { |
︙ | ︙ |
Changes to generic/tclIORTrans.c.
︙ | ︙ | |||
417 418 419 420 421 422 423 | */ static Tcl_Obj * DecodeEventMask(int mask); static ReflectedTransform * NewReflectedTransform(Tcl_Interp *interp, Tcl_Obj *cmdpfxObj, int mode, Tcl_Obj *handleObj, Tcl_Channel parentChan); static Tcl_Obj * NextHandle(void); | | | 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 | */ static Tcl_Obj * DecodeEventMask(int mask); static ReflectedTransform * NewReflectedTransform(Tcl_Interp *interp, Tcl_Obj *cmdpfxObj, int mode, Tcl_Obj *handleObj, Tcl_Channel parentChan); static Tcl_Obj * NextHandle(void); static Tcl_FreeProc FreeReflectedTransform; static void FreeReflectedTransformArgs(ReflectedTransform *rtPtr); static int InvokeTclMethod(ReflectedTransform *rtPtr, const char *method, Tcl_Obj *argOneObj, Tcl_Obj *argTwoObj, Tcl_Obj **resultObjPtr); static ReflectedTransformMap * GetReflectedTransformMap(Tcl_Interp *interp); static void DeleteReflectedTransformMap(void *clientData, |
︙ | ︙ | |||
717 718 719 720 721 722 723 | error: /* * We are not going through ReflectClose as we never had a channel * structure. */ | | | 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 | error: /* * We are not going through ReflectClose as we never had a channel * structure. */ Tcl_EventuallyFree(rtPtr, FreeReflectedTransform); return TCL_ERROR; #undef CHAN #undef CMD } /* |
︙ | ︙ | |||
927 928 929 930 931 932 933 | if (result != TCL_OK) { FreeReceivedError(&p); } } #endif /* TCL_THREADS */ | | | | | | 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 | if (result != TCL_OK) { FreeReceivedError(&p); } } #endif /* TCL_THREADS */ Tcl_EventuallyFree(rtPtr, FreeReflectedTransform); return EOK; } /* * In the reflected channel implementation a cleaned method mask here * implies that the channel creation was aborted, and "finalize" must not * be called. for transformations however we are not going through here on * such an abort, but directly through FreeReflectedTransform. So for us * that check is not necessary. We always go through 'finalize'. */ if (HAS(rtPtr->methods, METH_DRAIN) && !rtPtr->readIsDrained) { if (!TransformDrain(rtPtr, &errorCode)) { #if TCL_THREADS if (rtPtr->thread != Tcl_GetCurrentThread()) { Tcl_EventuallyFree(rtPtr, FreeReflectedTransform); return errorCode; } #endif /* TCL_THREADS */ errorCodeSet = 1; goto cleanup; } } if (HAS(rtPtr->methods, METH_FLUSH)) { if (!TransformFlush(rtPtr, &errorCode, FLUSH_WRITE)) { #if TCL_THREADS if (rtPtr->thread != Tcl_GetCurrentThread()) { Tcl_EventuallyFree(rtPtr, FreeReflectedTransform); return errorCode; } #endif /* TCL_THREADS */ errorCodeSet = 1; goto cleanup; } } /* * Are we in the correct thread? */ #if TCL_THREADS if (rtPtr->thread != Tcl_GetCurrentThread()) { ForwardParam p; ForwardOpToOwnerThread(rtPtr, ForwardedClose, &p); result = p.base.code; Tcl_EventuallyFree(rtPtr, FreeReflectedTransform); if (result != TCL_OK) { PassReceivedErrorInterp(interp, &p); return EINVAL; } return EOK; } |
︙ | ︙ | |||
1037 1038 1039 1040 1041 1042 1043 | hPtr = Tcl_FindHashEntry(&rtmPtr->map, TclGetString(rtPtr->handle)); if (hPtr) { Tcl_DeleteHashEntry(hPtr); } #endif /* TCL_THREADS */ } | | | 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 | hPtr = Tcl_FindHashEntry(&rtmPtr->map, TclGetString(rtPtr->handle)); if (hPtr) { Tcl_DeleteHashEntry(hPtr); } #endif /* TCL_THREADS */ } Tcl_EventuallyFree(rtPtr, FreeReflectedTransform); return errorCodeSet ? errorCode : ((result == TCL_OK) ? EOK : EINVAL); } /* *---------------------------------------------------------------------- * * ReflectInput -- |
︙ | ︙ | |||
1906 1907 1908 1909 1910 1911 1912 | Tcl_DecrRefCount(rtPtr->argv[n+1]); rtPtr->argc = 1; } static void FreeReflectedTransform( | | > | 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 | Tcl_DecrRefCount(rtPtr->argv[n+1]); rtPtr->argc = 1; } static void FreeReflectedTransform( char *blockPtr) { ReflectedTransform *rtPtr = (ReflectedTransform *) blockPtr; TimerKill(rtPtr); ResultClear(&rtPtr->result); FreeReflectedTransformArgs(rtPtr); ckfree(rtPtr->argv); ckfree(rtPtr); |
︙ | ︙ |
Changes to generic/tclTest.c.
︙ | ︙ | |||
235 236 237 238 239 240 241 | static Tcl_ResolveCompiledVarProc InterpCompiledVarResolver; static void MainLoop(void); static Tcl_CmdProc NoopCmd; static Tcl_ObjCmdProc NoopObjCmd; static Tcl_CmdObjTraceProc2 ObjTraceProc; static void ObjTraceDeleteProc(void *clientData); static void PrintParse(Tcl_Interp *interp, Tcl_Parse *parsePtr); | | | 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | static Tcl_ResolveCompiledVarProc InterpCompiledVarResolver; static void MainLoop(void); static Tcl_CmdProc NoopCmd; static Tcl_ObjCmdProc NoopObjCmd; static Tcl_CmdObjTraceProc2 ObjTraceProc; static void ObjTraceDeleteProc(void *clientData); static void PrintParse(Tcl_Interp *interp, Tcl_Parse *parsePtr); static Tcl_FreeProc SpecialFree; static int StaticInitProc(Tcl_Interp *interp); static Tcl_CmdProc TestasyncCmd; static Tcl_ObjCmdProc TestbumpinterpepochObjCmd; static Tcl_ObjCmdProc TestbytestringObjCmd; static Tcl_ObjCmdProc TestsetbytearraylengthObjCmd; static Tcl_ObjCmdProc TestpurebytesobjObjCmd; static Tcl_ObjCmdProc TeststringbytesObjCmd; |
︙ | ︙ | |||
297 298 299 300 301 302 303 | static Tcl_ObjCmdProc TestprintObjCmd; static Tcl_ObjCmdProc TestregexpObjCmd; static Tcl_ObjCmdProc TestreturnObjCmd; static void TestregexpXflags(const char *string, size_t length, int *cflagsPtr, int *eflagsPtr); #ifndef TCL_NO_DEPRECATED static Tcl_ObjCmdProc TestsaveresultCmd; | | | 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | static Tcl_ObjCmdProc TestprintObjCmd; static Tcl_ObjCmdProc TestregexpObjCmd; static Tcl_ObjCmdProc TestreturnObjCmd; static void TestregexpXflags(const char *string, size_t length, int *cflagsPtr, int *eflagsPtr); #ifndef TCL_NO_DEPRECATED static Tcl_ObjCmdProc TestsaveresultCmd; static Tcl_FreeProc TestsaveresultFree; #endif /* TCL_NO_DEPRECATED */ static Tcl_CmdProc TestsetassocdataCmd; static Tcl_CmdProc TestsetCmd; static Tcl_CmdProc Testset2Cmd; static Tcl_CmdProc TestseterrorcodeCmd; static Tcl_ObjCmdProc TestsetobjerrorcodeCmd; static Tcl_CmdProc TestsetplatformCmd; |
︙ | ︙ | |||
2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 | /* * The procedure below is used as a special freeProc to test how well * Tcl_DStringGetResult handles freeProc's other than free. */ static void SpecialFree( char *blockPtr /* Block to free. */ ) { ckfree((char *)blockPtr - 16); } /* *------------------------------------------------------------------------ * | > > > > | 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 | /* * The procedure below is used as a special freeProc to test how well * Tcl_DStringGetResult handles freeProc's other than free. */ static void SpecialFree( #if TCL_MAJOR_VERSION > 8 void *blockPtr /* Block to free. */ #else char *blockPtr /* Block to free. */ #endif ) { ckfree((char *)blockPtr - 16); } /* *------------------------------------------------------------------------ * |
︙ | ︙ | |||
5994 5995 5996 5997 5998 5999 6000 | * Increments the freeCount. * *---------------------------------------------------------------------- */ static void TestsaveresultFree( | > | > > > | 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 | * Increments the freeCount. * *---------------------------------------------------------------------- */ static void TestsaveresultFree( #if TCL_MAJOR_VERSION > 8 (TCL_UNUSED void *)) #else (TCL_UNUSED char *)) #endif { freeCount++; } #endif /* TCL_NO_DEPRECATED */ /* *---------------------------------------------------------------------- |
︙ | ︙ |