diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-04-07 10:31:49 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-04-07 10:31:49 (GMT) |
| commit | 3a03f53f1db809175b0e67ca7881a4f3bee63e7b (patch) | |
| tree | fbbbb50c014e6f66baee5024817dffd9c2007f4d | |
| parent | ce1a1c9f1387df9db70689527f74c37b4c3cf7c0 (diff) | |
| parent | a01643e73b5c590d77038e45206e8ee124a75dec (diff) | |
| download | tcl-3a03f53f1db809175b0e67ca7881a4f3bee63e7b.zip tcl-3a03f53f1db809175b0e67ca7881a4f3bee63e7b.tar.gz tcl-3a03f53f1db809175b0e67ca7881a4f3bee63e7b.tar.bz2 | |
Merge 9.0
| -rw-r--r-- | generic/tclBasic.c | 4 | ||||
| -rw-r--r-- | unix/tclAppInit.c | 7 | ||||
| -rw-r--r-- | win/tclAppInit.c | 4 |
3 files changed, 14 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b90e12d..911469b 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -3435,6 +3435,8 @@ Tcl_DeleteCommandFromToken( if (cmdPtr->tracePtr != NULL) { CommandTrace *tracePtr; + /* Note that CallCommandTraces() never frees cmdPtr, that's + * done just before Tcl_DeleteCommandFromToken() returns */ CallCommandTraces(iPtr,cmdPtr,NULL,NULL,TCL_TRACE_DELETE); /* @@ -3663,6 +3665,8 @@ CallCommandTraces( cmdPtr->flags &= ~CMD_TRACE_ACTIVE; cmdPtr->refCount--; + /* Don't free cmdPtr here, since the caller of CallCommandTraces() + * is responsible for that. See Tcl_DeleteCommandFromToken() */ iPtr->activeCmdTracePtr = active.nextPtr; Tcl_Release(iPtr); return result; diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c index 5d41087..f3caae7 100644 --- a/unix/tclAppInit.c +++ b/unix/tclAppInit.c @@ -15,6 +15,10 @@ #undef BUILD_tcl #undef STATIC_BUILD #include "tcl.h" +#if TCL_MAJOR_VERSION < 9 && TCL_MINOR_VERSION < 7 +# define Tcl_LibraryInitProc Tcl_PackageInitProc +# define Tcl_StaticLibrary Tcl_StaticPackage +#endif #ifdef TCL_TEST extern Tcl_LibraryInitProc Tcltest_Init; @@ -79,7 +83,8 @@ main( #ifdef TCL_LOCAL_MAIN_HOOK TCL_LOCAL_MAIN_HOOK(&argc, &argv); -#else +#elif !defined(_WIN32) || defined(UNICODE) + /* This doesn't work on Windows without UNICODE */ TclZipfs_AppHook(&argc, &argv); #endif diff --git a/win/tclAppInit.c b/win/tclAppInit.c index 2d475a0..67218fd 100644 --- a/win/tclAppInit.c +++ b/win/tclAppInit.c @@ -23,6 +23,10 @@ #include <locale.h> #include <stdlib.h> #include <tchar.h> +#if TCL_MAJOR_VERSION < 9 && TCL_MINOR_VERSION < 7 +# define Tcl_LibraryInitProc Tcl_PackageInitProc +# define Tcl_StaticLibrary Tcl_StaticPackage +#endif #ifdef TCL_TEST extern Tcl_LibraryInitProc Tcltest_Init; |
