diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-04-07 09:55:24 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-04-07 09:55:24 (GMT) |
commit | 06813163a831a73bcdd74a5341bbc547fbb3e342 (patch) | |
tree | 3621b32733f4eca62779e166f45eccaa23c04402 /unix/tclAppInit.c | |
parent | a1ab68d1ea255fa6445c92b5178da5bedca3f6a4 (diff) | |
download | tcl-06813163a831a73bcdd74a5341bbc547fbb3e342.zip tcl-06813163a831a73bcdd74a5341bbc547fbb3e342.tar.gz tcl-06813163a831a73bcdd74a5341bbc547fbb3e342.tar.bz2 |
TIP #595 (for Tcl 8.7) part 1: just rename Tcl_StaticPackage to Tcl_StaticLibrary, Tcl_PackageInitProc to Tcl_LibraryInitProc and Tcl_PackageUnloadProc to Tcl_LibraryUnloadProc. Adapt documentation, mentioning that the old names are now deprecated.
Diffstat (limited to 'unix/tclAppInit.c')
-rw-r--r-- | unix/tclAppInit.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c index 3587f35..f3caae7 100644 --- a/unix/tclAppInit.c +++ b/unix/tclAppInit.c @@ -15,15 +15,19 @@ #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_PackageInitProc Tcltest_Init; -extern Tcl_PackageInitProc Tcltest_SafeInit; +extern Tcl_LibraryInitProc Tcltest_Init; +extern Tcl_LibraryInitProc Tcltest_SafeInit; #endif /* TCL_TEST */ #ifdef TCL_XT_TEST extern void XtToolkitInitialize(void); -extern Tcl_PackageInitProc Tclxttest_Init; +extern Tcl_LibraryInitProc Tclxttest_Init; #endif /* TCL_XT_TEST */ /* @@ -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 @@ -124,7 +129,7 @@ Tcl_AppInit( if (Tcltest_Init(interp) == TCL_ERROR) { return TCL_ERROR; } - Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init, Tcltest_SafeInit); + Tcl_StaticLibrary(interp, "Tcltest", Tcltest_Init, Tcltest_SafeInit); #endif /* TCL_TEST */ /* |