File tree 5 files changed +35
-13
lines changed 5 files changed +35
-13
lines changed Original file line number Diff line number Diff line change 1
1
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
2
- index 2a3e65b6c97..b17c5bfd6b1 100644
2
+ index 2a3e65b6c97..04f2ab0ea10 100644
3
3
--- a/Modules/_tkinter.c
4
4
+++ b/Modules/_tkinter.c
5
5
@@ -115,6 +115,7 @@ Copyright (C) 1994 Steen Lumholt.
@@ -82,7 +82,7 @@ index 2a3e65b6c97..b17c5bfd6b1 100644
82
82
str_path = _get_tcl_lib_path();
83
83
if (str_path == NULL && PyErr_Occurred()) {
84
84
return NULL;
85
- @@ -3628,7 +3674,27 @@ PyInit__tkinter(void)
85
+ @@ -3628,7 +3674,32 @@ PyInit__tkinter(void)
86
86
PyMem_Free(wcs_path);
87
87
}
88
88
#else
@@ -97,6 +97,11 @@ index 2a3e65b6c97..b17c5bfd6b1 100644
97
97
+ return NULL;
98
98
+ }
99
99
+ if (str_path != NULL) {
100
+ + path = PyUnicode_AsUTF8(str_path);
101
+ + if (path == NULL) {
102
+ + Py_DECREF(m);
103
+ + return NULL;
104
+ + }
100
105
+ setenv("TCL_LIBRARY", path, 1);
101
106
+ set_var = 1;
102
107
+ }
Original file line number Diff line number Diff line change 1
1
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
2
- index 005036d3ff2..c130ed7b186 100644
2
+ index 005036d3ff2..0e64706584a 100644
3
3
--- a/Modules/_tkinter.c
4
4
+++ b/Modules/_tkinter.c
5
5
@@ -28,9 +28,7 @@ Copyright (C) 1994 Steen Lumholt.
@@ -93,7 +93,7 @@ index 005036d3ff2..c130ed7b186 100644
93
93
str_path = _get_tcl_lib_path();
94
94
if (str_path == NULL && PyErr_Occurred()) {
95
95
return NULL;
96
- @@ -3428,7 +3472,27 @@ PyInit__tkinter(void)
96
+ @@ -3428,7 +3472,32 @@ PyInit__tkinter(void)
97
97
PyMem_Free(wcs_path);
98
98
}
99
99
#else
@@ -108,6 +108,11 @@ index 005036d3ff2..c130ed7b186 100644
108
108
+ return NULL;
109
109
+ }
110
110
+ if (str_path != NULL) {
111
+ + path = PyUnicode_AsUTF8(str_path);
112
+ + if (path == NULL) {
113
+ + Py_DECREF(m);
114
+ + return NULL;
115
+ + }
111
116
+ setenv("TCL_LIBRARY", path, 1);
112
117
+ set_var = 1;
113
118
+ }
Original file line number Diff line number Diff line change 1
1
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
2
- index 6b5fcb8a365..99d44ccf1d8 100644
2
+ index 6b5fcb8a365..7b196f40166 100644
3
3
--- a/Modules/_tkinter.c
4
4
+++ b/Modules/_tkinter.c
5
5
@@ -28,9 +28,7 @@ Copyright (C) 1994 Steen Lumholt.
@@ -93,7 +93,7 @@ index 6b5fcb8a365..99d44ccf1d8 100644
93
93
str_path = _get_tcl_lib_path();
94
94
if (str_path == NULL && PyErr_Occurred()) {
95
95
return NULL;
96
- @@ -3542,7 +3586,27 @@ PyInit__tkinter(void)
96
+ @@ -3542,7 +3586,32 @@ PyInit__tkinter(void)
97
97
PyMem_Free(wcs_path);
98
98
}
99
99
#else
@@ -108,6 +108,11 @@ index 6b5fcb8a365..99d44ccf1d8 100644
108
108
+ return NULL;
109
109
+ }
110
110
+ if (str_path != NULL) {
111
+ + path = PyUnicode_AsUTF8(str_path);
112
+ + if (path == NULL) {
113
+ + Py_DECREF(m);
114
+ + return NULL;
115
+ + }
111
116
+ setenv("TCL_LIBRARY", path, 1);
112
117
+ set_var = 1;
113
118
+ }
Original file line number Diff line number Diff line change 1
1
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
2
- index 45897817a56..671b3dfc3d0 100644
2
+ index 45897817a56..5633187730a 100644
3
3
--- a/Modules/_tkinter.c
4
4
+++ b/Modules/_tkinter.c
5
5
@@ -26,9 +26,8 @@ Copyright (C) 1994 Steen Lumholt.
@@ -94,7 +94,7 @@ index 45897817a56..671b3dfc3d0 100644
94
94
str_path = _get_tcl_lib_path();
95
95
if (str_path == NULL && PyErr_Occurred()) {
96
96
return NULL;
97
- @@ -3552,7 +3597,27 @@ PyInit__tkinter(void)
97
+ @@ -3552,7 +3597,32 @@ PyInit__tkinter(void)
98
98
PyMem_Free(wcs_path);
99
99
}
100
100
#else
@@ -109,6 +109,11 @@ index 45897817a56..671b3dfc3d0 100644
109
109
+ return NULL;
110
110
+ }
111
111
+ if (str_path != NULL) {
112
+ + path = PyUnicode_AsUTF8(str_path);
113
+ + if (path == NULL) {
114
+ + Py_DECREF(m);
115
+ + return NULL;
116
+ + }
112
117
+ setenv("TCL_LIBRARY", path, 1);
113
118
+ set_var = 1;
114
119
+ }
@@ -122,6 +127,3 @@ index 45897817a56..671b3dfc3d0 100644
122
127
#endif /* MS_WINDOWS */
123
128
}
124
129
Py_XDECREF(cexe);
125
- diff --git a/patch-tkinter.patch b/patch-tkinter.patch
126
- new file mode 100644
127
- index 00000000000..e69de29bb2d
Original file line number Diff line number Diff line change 1
1
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
2
- index e153047b778..5dbaf2e3e6e 100644
2
+ index e153047b778..02f5d12db1a 100644
3
3
--- a/Modules/_tkinter.c
4
4
+++ b/Modules/_tkinter.c
5
5
@@ -115,6 +115,7 @@ Copyright (C) 1994 Steen Lumholt.
@@ -82,7 +82,7 @@ index e153047b778..5dbaf2e3e6e 100644
82
82
str_path = _get_tcl_lib_path();
83
83
if (str_path == NULL && PyErr_Occurred()) {
84
84
return NULL;
85
- @@ -3631,7 +3677,27 @@ PyInit__tkinter(void)
85
+ @@ -3631,7 +3677,32 @@ PyInit__tkinter(void)
86
86
PyMem_Free(wcs_path);
87
87
}
88
88
#else
@@ -97,6 +97,11 @@ index e153047b778..5dbaf2e3e6e 100644
97
97
+ return NULL;
98
98
+ }
99
99
+ if (str_path != NULL) {
100
+ + path = PyUnicode_AsUTF8(str_path);
101
+ + if (path == NULL) {
102
+ + Py_DECREF(m);
103
+ + return NULL;
104
+ + }
100
105
+ setenv("TCL_LIBRARY", path, 1);
101
106
+ set_var = 1;
102
107
+ }
You can’t perform that action at this time.
0 commit comments