diff options
Diffstat (limited to 'unix/tkAppInit.c')
-rw-r--r-- | unix/tkAppInit.c | 13 |
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 */ /* |