return old value of PyMac_DoYieldEnabled; -1 means do not even check for interrupts

This commit is contained in:
Guido van Rossum 1995-02-26 10:20:53 +00:00
parent 83c434b145
commit e7134aa0f2
2 changed files with 15 additions and 6 deletions

View file

@ -197,13 +197,13 @@ MacOS_SetScheduleTimes(PyObject *self, PyObject *args)
static PyObject *
MacOS_EnableAppswitch(PyObject *self, PyObject *args)
{
int enable;
int old, new;
if (!PyArg_ParseTuple(args, "i", &enable))
if (!PyArg_ParseTuple(args, "i", &new))
return NULL;
PyMac_DoYieldEnabled = enable;
Py_INCREF(Py_None);
return Py_None;
old = PyMac_DoYieldEnabled;
PyMac_DoYieldEnabled = new;
return Py_BuildValue("i", old);
}
@ -246,3 +246,4 @@ MacOS_Init()
if (MacOS_Error == NULL || PyDict_SetItemString(d, "Error", MacOS_Error) != 0)
Py_FatalError("can't define MacOS.Error");
}