Applied patch: a91559b82c to fix issue #1902

This commit is contained in:
wiredfool 2017-01-17 06:20:39 -08:00
parent da8f2737a8
commit ca3f6a25f4

View File

@ -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;
}