mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-103538: Remove unused TK_AQUA code (GH-103539)
This commit is contained in:
parent
a33ce66dca
commit
e464ec9f4c
3 changed files with 3 additions and 64 deletions
|
@ -23,54 +23,9 @@ Tcl_AppInit(Tcl_Interp *interp)
|
|||
{
|
||||
const char *_tkinter_skip_tk_init;
|
||||
|
||||
#ifdef TK_AQUA
|
||||
#ifndef MAX_PATH_LEN
|
||||
#define MAX_PATH_LEN 1024
|
||||
#endif
|
||||
char tclLibPath[MAX_PATH_LEN], tkLibPath[MAX_PATH_LEN];
|
||||
Tcl_Obj* pathPtr;
|
||||
|
||||
/* pre- Tcl_Init code copied from tkMacOSXAppInit.c */
|
||||
Tk_MacOSXOpenBundleResources (interp, "com.tcltk.tcllibrary",
|
||||
tclLibPath, MAX_PATH_LEN, 0);
|
||||
|
||||
if (tclLibPath[0] != '\0') {
|
||||
Tcl_SetVar(interp, "tcl_library", tclLibPath, TCL_GLOBAL_ONLY);
|
||||
Tcl_SetVar(interp, "tclDefaultLibrary", tclLibPath, TCL_GLOBAL_ONLY);
|
||||
Tcl_SetVar(interp, "tcl_pkgPath", tclLibPath, TCL_GLOBAL_ONLY);
|
||||
}
|
||||
|
||||
if (tclLibPath[0] != '\0') {
|
||||
Tcl_SetVar(interp, "tcl_library", tclLibPath, TCL_GLOBAL_ONLY);
|
||||
Tcl_SetVar(interp, "tclDefaultLibrary", tclLibPath, TCL_GLOBAL_ONLY);
|
||||
Tcl_SetVar(interp, "tcl_pkgPath", tclLibPath, TCL_GLOBAL_ONLY);
|
||||
}
|
||||
#endif
|
||||
if (Tcl_Init (interp) == TCL_ERROR)
|
||||
return TCL_ERROR;
|
||||
|
||||
#ifdef TK_AQUA
|
||||
/* pre- Tk_Init code copied from tkMacOSXAppInit.c */
|
||||
Tk_MacOSXOpenBundleResources (interp, "com.tcltk.tklibrary",
|
||||
tkLibPath, MAX_PATH_LEN, 1);
|
||||
|
||||
if (tclLibPath[0] != '\0') {
|
||||
pathPtr = Tcl_NewStringObj(tclLibPath, -1);
|
||||
} else {
|
||||
Tcl_Obj *pathPtr = TclGetLibraryPath();
|
||||
}
|
||||
|
||||
if (tkLibPath[0] != '\0') {
|
||||
Tcl_Obj *objPtr;
|
||||
|
||||
Tcl_SetVar(interp, "tk_library", tkLibPath, TCL_GLOBAL_ONLY);
|
||||
objPtr = Tcl_NewStringObj(tkLibPath, -1);
|
||||
Tcl_ListObjAppendElement(NULL, pathPtr, objPtr);
|
||||
}
|
||||
|
||||
TclSetLibraryPath(pathPtr);
|
||||
#endif
|
||||
|
||||
#ifdef WITH_XXX
|
||||
/* Initialize modules that don't require Tk */
|
||||
#endif
|
||||
|
@ -88,11 +43,6 @@ Tcl_AppInit(Tcl_Interp *interp)
|
|||
|
||||
Tk_MainWindow(interp);
|
||||
|
||||
#ifdef TK_AQUA
|
||||
TkMacOSXInitAppleEvents(interp);
|
||||
TkMacOSXInitMenus(interp);
|
||||
#endif
|
||||
|
||||
#ifdef WITH_PIL /* 0.2b5 and later -- not yet released as of May 14 */
|
||||
{
|
||||
extern void TkImaging_Init(Tcl_Interp *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue