if (!PyArg_ParseTuple(arg, "Oi:__init__", &me, &err) ||
(x = PyInt_FromLong(err)) == 0 ||
PyObject_SetAttrString(me, "err", x))
- goto fail;
- Py_DECREF(x); x = 0;
- if ((x = PyString_FromString(key_strerror(err))) == 0 ||
- PyObject_SetAttrString(me, "errstring", x))
- goto fail;
+ goto end;
Py_DECREF(x); x = 0;
if ((x = PyString_FromString(key_strerror(err))) == 0 ||
PyObject_SetAttrString(me, "errstring", x))
- goto fail;
+ goto end;
Py_DECREF(x); x = 0;
if ((x = PySequence_GetSlice(arg, 1, PySequence_Size(arg))) == 0 ||
PyObject_SetAttrString(me, "args", x))
- goto fail;
+ goto end;
Py_DECREF(x); x = 0;
RETURN_NONE;
-fail:
+end:
Py_XDECREF(x);
return (0);
}
static void keyexc_raise(int err)
{
- PyObject *arg = Py_BuildValue("(is)", err, key_strerror(err));
+ PyObject *arg = Py_BuildValue("(i)", err);
if (arg) PyErr_SetObject(keyexc, arg);
Py_XDECREF(arg);
}
goto end;
else if (n != 2)
goto tyerr;
- else if ((a = PySequence_GetItem(x, 0)) == 0 || convuint(a, &f->f) ||
- (b = PySequence_GetItem(x, 1)) == 0 || convuint(b, &f->m))
+ else if ((a = PySequence_GetItem(x, 0)) == 0 || !convuint(a, &f->f) ||
+ (b = PySequence_GetItem(x, 1)) == 0 || !convuint(b, &f->m))
goto end;
}
rc = 1;