X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/blobdiff_plain/1df8d5fe8538884aaeb3ccf8036b88efcc7560c5..80622b5a78dcb17098d8765857d89824ad8417e4:/key.c diff --git a/key.c b/key.c index 5511699..997cf3c 100644 --- a/key.c +++ b/key.c @@ -104,7 +104,7 @@ static PyMethodDef keyexc_pymethods[] = { 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); } @@ -229,8 +229,8 @@ static int convfilter(PyObject *x, void *p) 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;