diff options
| -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; |
