Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 42055bd

Browse files
committed
Merge pull request matplotlib#2107 from cgohlke/patch-1
Fix 64 bit compatibility on Windows
2 parents f9c8dda + baf5699 commit 42055bd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/_tkagg.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ _pyobj_addr(PyObject* self, PyObject* args)
219219
{
220220
return NULL;
221221
}
222-
return Py_BuildValue("l", (long) pyobj);
222+
return Py_BuildValue("n", (Py_ssize_t) pyobj);
223223
}
224224

225225
static PyObject*
@@ -228,9 +228,9 @@ _tkinit(PyObject* self, PyObject* args)
228228
Tcl_Interp* interp;
229229
TkappObject* app;
230230

231-
long arg;
231+
Py_ssize_t arg;
232232
int is_interp;
233-
if (!PyArg_ParseTuple(args, "li", &arg, &is_interp))
233+
if (!PyArg_ParseTuple(args, "ni", &arg, &is_interp))
234234
{
235235
return NULL;
236236
}

0 commit comments

Comments
 (0)