Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a91559b

Browse filesBrowse files
committed
Use correct type for Tk addresses.
CPython has used a long for this address since before 2010 (it is difficult to read the merge from SVN back then), and has been a long-from-void* since 2013 (3.3.3 and 2.7.6). Fixes #7633.
1 parent f7c97f0 commit a91559b
Copy full SHA for a91559b

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎src/_tkagg.cpp

Copy file name to clipboardExpand all lines: src/_tkagg.cpp
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,18 +188,18 @@ static PyObject *_tkinit(PyObject *self, PyObject *args)
188188
Tcl_Interp *interp;
189189
TkappObject *app;
190190

191-
Py_ssize_t arg;
191+
PyObject *arg;
192192
int is_interp;
193-
if (!PyArg_ParseTuple(args, "ni", &arg, &is_interp)) {
193+
if (!PyArg_ParseTuple(args, "Oi", &arg, &is_interp)) {
194194
return NULL;
195195
}
196196

197197
if (is_interp) {
198-
interp = (Tcl_Interp *)arg;
198+
interp = (Tcl_Interp *)PyLong_AsVoidPtr(arg);
199199
} else {
200200
/* Do it the hard way. This will break if the TkappObject
201201
layout changes */
202-
app = (TkappObject *)arg;
202+
app = (TkappObject *)PyLong_AsVoidPtr(arg);
203203
interp = app->interp;
204204
}
205205

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.