summaryrefslogtreecommitdiffstats
path: root/Modules/tkappinit.c
diff options
context:
space:
mode:
authorChristopher Chavez <chrischavez@gmx.us>2023-04-14 14:04:16 (GMT)
committerGitHub <noreply@github.com>2023-04-14 14:04:16 (GMT)
commit69e2c42f42f1d6fb1287ac5f9c6d19f2822df8fe (patch)
tree3f1445bac2d12a9c8988957d02ce544c90ad1215 /Modules/tkappinit.c
parentbe8903eb9d66ef1229f93a3a6036aeafc3bb0bda (diff)
downloadcpython-69e2c42f42f1d6fb1287ac5f9c6d19f2822df8fe.zip
cpython-69e2c42f42f1d6fb1287ac5f9c6d19f2822df8fe.tar.gz
cpython-69e2c42f42f1d6fb1287ac5f9c6d19f2822df8fe.tar.bz2
gh-103532: Remove TKINTER_PROTECT_LOADTK code (GH-103535)
This was only needed for Tk 8.4.13 and older, but Tkinter already requires at least 8.5.12.
Diffstat (limited to 'Modules/tkappinit.c')
-rw-r--r--Modules/tkappinit.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/Modules/tkappinit.c b/Modules/tkappinit.c
index 7616d9d..67d6250 100644
--- a/Modules/tkappinit.c
+++ b/Modules/tkappinit.c
@@ -18,18 +18,10 @@
#include "tkinter.h"
-#ifdef TKINTER_PROTECT_LOADTK
-/* See Tkapp_TkInit in _tkinter.c for the usage of tk_load_faile */
-static int tk_load_failed;
-#endif
-
int
Tcl_AppInit(Tcl_Interp *interp)
{
const char *_tkinter_skip_tk_init;
-#ifdef TKINTER_PROTECT_LOADTK
- const char *_tkinter_tk_failed;
-#endif
#ifdef TK_AQUA
#ifndef MAX_PATH_LEN
@@ -90,23 +82,7 @@ Tcl_AppInit(Tcl_Interp *interp)
return TCL_OK;
}
-#ifdef TKINTER_PROTECT_LOADTK
- _tkinter_tk_failed = Tcl_GetVar(interp,
- "_tkinter_tk_failed", TCL_GLOBAL_ONLY);
-
- if (tk_load_failed || (
- _tkinter_tk_failed != NULL &&
- strcmp(_tkinter_tk_failed, "1") == 0)) {
- Tcl_SetResult(interp, TKINTER_LOADTK_ERRMSG, TCL_STATIC);
- return TCL_ERROR;
- }
-#endif
-
if (Tk_Init(interp) == TCL_ERROR) {
-#ifdef TKINTER_PROTECT_LOADTK
- tk_load_failed = 1;
- Tcl_SetVar(interp, "_tkinter_tk_failed", "1", TCL_GLOBAL_ONLY);
-#endif
return TCL_ERROR;
}