From ca3f6a25f40f6c51d69c71f1206e337684a36ef8 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Tue, 17 Jan 2017 06:20:39 -0800 Subject: [PATCH] Applied patch: https://github.com/matplotlib/matplotlib/commit/a91559b82cf23ee407cd57580653015fc7dc35f0 to fix issue #1902 --- _imagingtk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_imagingtk.c b/_imagingtk.c index 87de36a04..d0295f317 100644 --- a/_imagingtk.c +++ b/_imagingtk.c @@ -36,18 +36,18 @@ _tkinit(PyObject* self, PyObject* args) { Tcl_Interp* interp; - Py_ssize_t arg; + PyObject* arg; int is_interp; - if (!PyArg_ParseTuple(args, "ni", &arg, &is_interp)) + if (!PyArg_ParseTuple(args, "Oi", &arg, &is_interp)) return NULL; if (is_interp) - interp = (Tcl_Interp*) arg; + interp = (Tcl_Interp*)PyLong_AsVoidPtr(arg); else { TkappObject* app; /* Do it the hard way. This will break if the TkappObject layout changes */ - app = (TkappObject*) arg; + app = (TkappObject*)PyLong_AsVoidPtr(arg); interp = app->interp; }