8000 gh-103538: Remove unused TK_AQUA code · python/cpython@c035fc2 · GitHub
[go: up one dir, main page]

Skip to content

Commit c035fc2

Browse files
authored
gh-103538: Remove unused TK_AQUA code
1 parent be8903e commit c035fc2

File tree

2 files changed

+0
-64
lines changed

2 files changed

+0
-64
lines changed

Modules/_tkinter.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3330,20 +3330,6 @@ PyInit__tkinter(void)
33303330
}
33313331
PyTclObject_Type = o;
33323332

3333-
#ifdef TK_AQUA
3334-
/* Tk_MacOSXSetupTkNotifier must be called before Tcl's subsystems
3335-
* start waking up. Note that Tcl_FindExecutable will do this, this
3336-
* code must be above it! The original warning from
3337-
* tkMacOSXAppInit.c is copied below.
3338-
*
3339-
* NB - You have to swap in the Tk Notifier BEFORE you start up the
3340-
* Tcl interpreter for now. It probably should work to do this
3341-
* in the other order, but for now it doesn't seem to.
3342-
*
3343-
*/
3344-
Tk_MacOSXSetupTkNotifier();
3345-
#endif
3346-
33473333

33483334
/* This helps the dynamic loader; in Unicode aware Tcl versions
33493335
it also helps Tcl find its encodings. */

Modules/tkappinit.c

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -31,54 +31,9 @@ Tcl_AppInit(Tcl_Interp *interp)
3131
const char *_tkinter_tk_failed;
3232
#endif
3333

34-
#ifdef TK_AQUA
35-
#ifndef MAX_PATH_LEN
36-
#define MAX_PATH_LEN 1024
37-
#endif
38-
char tclLibPath[MAX_PATH_LEN], tkLibPath[MAX_PATH_LEN];
39-
Tcl_Obj* pathPtr;
40-
41-
/* pre- Tcl_Init code copied from tkMacOSXAppInit.c */
42-
Tk_MacOSXOpenBundleResources (interp, "com.tcltk.tcllibrary",
43-
tclLibPath, MAX_PATH_LEN, 0);
44-
45-
if (tclLibPath[0] != '\0') {
46-
Tcl_SetVar(interp, "tcl_library", tclLibPath, TCL_GLOBAL_ONLY);
47-
Tcl_SetVar(interp, "tclDefaultLibrary", tclLibPath, TCL_GLOBAL_ONLY);
48-
Tcl_SetVar(interp, "tcl_pkgPath", tclLibPath, TCL_GLOBAL_ONLY);
49-
}
50-
51-
if (tclLibPath[0] != '\0') {
52-
Tcl_SetVar(interp, "tcl_library", tclLibPath, TCL_GLOBAL_ONLY);
53-
Tcl_SetVar(interp, "tclDefaultLibrary", tclLibPath, TCL_GLOBAL_ONLY);
54-
Tcl_SetVar(interp, "tcl_pkgPath", tclLibPath, TCL_GLOBAL_ONLY);
55-
}
56-
#endif
5734
if (Tcl_Init (interp) == TCL_ERROR)
5835
return TCL_ERROR;
5936

60-
#ifdef TK_AQUA
61-
/* pre- Tk_Init code copied from tkMacOSXAppInit.c */
62-
Tk_MacOSXOpenBundleResources (interp, "com.tcltk.tklibrary",
63-
tkLibPath, MAX_PATH_LEN, 1);
64-
65-
if (tclLibPath[0] != '\0') {
66-
pathPtr = Tcl_NewStringObj(tclLibPath, -1);
67-
} else {
68-
Tcl_Obj *pathPtr = TclGetLibraryPath();
69-
}
70-
71-
if (tkLibPath[0] != '\0') {
72-
Tcl_Obj *objPtr;
73-
74-
Tcl_SetVar(interp, "tk_library", tkLibPath, TCL_GLOBAL_ONLY);
75-
objPtr = Tcl_NewStringObj(tkLibPath, -1);
76-
Tcl_ListObjAppendElement(NULL, pathPtr, objPtr);
77-
}
78-
79-
TclSetLibraryPath(pathPtr);
80-
#endif
81-
8237
#ifdef WITH_XXX
8338
/* Initialize modules that don't require Tk */
8439
#endif
@@ -112,11 +67,6 @@ Tcl_AppInit(Tcl_Interp *interp)
11267

11368
Tk_MainWindow(interp);
11469

< 6E62 /td>
115-
#ifdef TK_AQUA
116-
TkMacOSXInitAppleEvents(interp);
117-
TkMacOSXInitMenus(interp);
118-
#endif
119-
12070
#ifdef WITH_PIL /* 0.2b5 and later -- not yet released as of May 14 */
12171
{
12272
extern void TkImaging_Init(Tcl_Interp *);

0 commit comments

Comments
 (0)
0