Kaydet (Commit) 8f22b88e authored tarafından Thomas Heller's avatar Thomas Heller

Fix ctypes.set_errno for gcc.

üst e70c3378
......@@ -197,10 +197,12 @@ get_errno(PyObject *self, PyObject *args)
static PyObject *
set_errno(PyObject *self, PyObject *args)
{
int new_errno;
int new_errno, prev_errno;
if (!PyArg_ParseTuple(args, "i", &new_errno))
return NULL;
return PyInt_FromLong(_save_errno(new_errno));
prev_errno = ctypes_errno;
ctypes_errno = new_errno;
return PyInt_FromLong(prev_errno);
}
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment