Skip to content

Commit 63af66c

Browse files
Michiel Jan Laurens de HoonMichiel Jan Laurens de Hoon
authored andcommitted
don't check for thread support on Tcl 9.x, as it is always threaded and the tcl_platform(threaded) variable has been removed
1 parent 9f81539 commit 63af66c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Modules/_tkinter.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ _get_tcl_lib_path(void)
225225
226226
*/
227227

228+
#if TCL_MAJOR_VERSION < 9 /* Tcl 9.x is always threaded */
228229
static int
229230
_check_tcl_threaded(void)
230231
{
@@ -239,6 +240,7 @@ _check_tcl_threaded(void)
239240
if (threaded == NULL) return 0;
240241
else return 1;
241242
}
243+
#endif
242244

243245
static Tcl_ThreadDataKey state_key;
244246
typedef PyThreadState *ThreadSpecificData;
@@ -3414,11 +3416,13 @@ PyInit__tkinter(void)
34143416
{
34153417
PyObject *m, *uexe, *cexe;
34163418

3419+
#if TCL_MAJOR_VERSION < 9 /* Tcl 9.x is always threaded */
34173420
if (_check_tcl_threaded() == 0) {
34183421
PyErr_SetString(PyExc_ImportError,
34193422
"Tcl must be compiled with thread support");
34203423
return 0;
34213424
}
3425+
#endif
34223426

34233427
m = PyModule_Create(&_tkintermodule);
34243428
if (m == NULL)

0 commit comments

Comments
 (0)