Skip to content

Commit 3e998fd

Browse files
Michiel Jan Laurens de HoonMichiel Jan Laurens de Hoon
authored andcommitted
remove static, as non-constant global variables are generally not supported in the CPython repo.
1 parent 1cb7f4b commit 3e998fd

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

Modules/_tkinter.c

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ Tkapp_New(const char *screenName, const char *className,
617617
TkappObject *v;
618618
char *argv0;
619619
#if TCL_MAJOR_VERSION < 9 /* Tcl 9.x is always threaded */
620-
static Tcl_Obj* threaded = NULL;
620+
Tcl_Obj* threaded;
621621
#endif
622622

623623
PyTypeObject *tp = (PyTypeObject *)Tkapp_Type;
@@ -627,17 +627,15 @@ Tkapp_New(const char *screenName, const char *className,
627627

628628
v->interp = Tcl_CreateInterp();
629629
#if TCL_MAJOR_VERSION < 9 /* Tcl 9.x is always threaded */
630+
threaded = Tcl_GetVar2Ex(v->interp,
631+
"tcl_platform",
632+
"threaded",
633+
TCL_GLOBAL_ONLY);
630634
if (threaded == NULL) {
631-
threaded = Tcl_GetVar2Ex(v->interp,
632-
"tcl_platform",
633-
"threaded",
634-
TCL_GLOBAL_ONLY);
635-
if (threaded == NULL) {
636-
PyErr_SetString(PyExc_RuntimeError,
637-
"Tcl must be compiled with thread support");
638-
Py_DECREF(v);
639-
return NULL;
640-
}
635+
PyErr_SetString(PyExc_RuntimeError,
636+
"Tcl must be compiled with thread support");
637+
Py_DECREF(v);
638+
return NULL;
641639
}
642640
#endif
643641
v->wantobjects = wantobjects;

0 commit comments

Comments
 (0)