summaryrefslogtreecommitdiffstats
path: root/unix/tkAppInit.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2021-11-16 20:39:47 (GMT)
committerfvogel <fvogelnew1@free.fr>2021-11-16 20:39:47 (GMT)
commitd8f50ac067d2f0df387ca0b0c46278c2464efc8b (patch)
tree4c40167ca8b673d38459b4478944b8bc60cc4a7f /unix/tkAppInit.c
parentc56ea97892bf4b5716fd0c88709b0ef0cb130995 (diff)
parenta9827f93eadc2978316098553e09406dae1f5520 (diff)
downloadtk-bug-b1d115fa60.zip
tk-bug-b1d115fa60.tar.gz
tk-bug-b1d115fa60.tar.bz2
Diffstat (limited to 'unix/tkAppInit.c')
-rw-r--r--unix/tkAppInit.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/unix/tkAppInit.c b/unix/tkAppInit.c
index 6cf3d42..1a2421c 100644
--- a/unix/tkAppInit.c
+++ b/unix/tkAppInit.c
@@ -16,12 +16,16 @@
#undef STATIC_BUILD
#include "tk.h"
#include "tkPort.h"
+#if TCL_MAJOR_VERSION < 9 && TCL_MINOR_VERSION < 7
+# define Tcl_LibraryInitProc Tcl_PackageInitProc
+# define Tcl_StaticLibrary Tcl_StaticPackage
+#endif
#ifdef TK_TEST
#ifdef __cplusplus
extern "C" {
#endif
-extern Tcl_PackageInitProc Tktest_Init;
+extern Tcl_LibraryInitProc Tktest_Init;
#ifdef __cplusplus
}
#endif
@@ -120,12 +124,11 @@ Tcl_AppInit(
if (Tk_Init(interp) == TCL_ERROR) {
return TCL_ERROR;
}
- Tcl_StaticPackage(interp, "Tk", Tk_Init, Tk_SafeInit);
+ Tcl_StaticLibrary(interp, "Tk", Tk_Init, Tk_SafeInit);
#if defined(USE_CUSTOM_EXIT_PROC)
if (TkpWantsExitProc()) {
- /* The cast below avoids warnings from old gcc compilers. */
- Tcl_SetExitProc((void *)TkpExitProc);
+ Tcl_SetExitProc(TkpExitProc);
}
#endif
@@ -133,7 +136,7 @@ Tcl_AppInit(
if (Tktest_Init(interp) == TCL_ERROR) {
return TCL_ERROR;
}
- Tcl_StaticPackage(interp, "Tktest", Tktest_Init, 0);
+ Tcl_StaticLibrary(interp, "Tktest", Tktest_Init, 0);
#endif /* TK_TEST */
/*