mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-10 16:22:22 +03:00
Applied patch: a91559b82c
to fix issue #1902
This commit is contained in:
parent
da8f2737a8
commit
ca3f6a25f4
|
@ -36,18 +36,18 @@ _tkinit(PyObject* self, PyObject* args)
|
||||||
{
|
{
|
||||||
Tcl_Interp* interp;
|
Tcl_Interp* interp;
|
||||||
|
|
||||||
Py_ssize_t arg;
|
PyObject* arg;
|
||||||
int is_interp;
|
int is_interp;
|
||||||
if (!PyArg_ParseTuple(args, "ni", &arg, &is_interp))
|
if (!PyArg_ParseTuple(args, "Oi", &arg, &is_interp))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (is_interp)
|
if (is_interp)
|
||||||
interp = (Tcl_Interp*) arg;
|
interp = (Tcl_Interp*)PyLong_AsVoidPtr(arg);
|
||||||
else {
|
else {
|
||||||
TkappObject* app;
|
TkappObject* app;
|
||||||
/* Do it the hard way. This will break if the TkappObject
|
/* Do it the hard way. This will break if the TkappObject
|
||||||
layout changes */
|
layout changes */
|
||||||
app = (TkappObject*) arg;
|
app = (TkappObject*)PyLong_AsVoidPtr(arg);
|
||||||
interp = app->interp;
|
interp = app->interp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user