diff options
Diffstat (limited to 'libdimension-python')
-rw-r--r-- | libdimension-python/dimension.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libdimension-python/dimension.c b/libdimension-python/dimension.c index e57767d..f47dfbc 100644 --- a/libdimension-python/dimension.c +++ b/libdimension-python/dimension.c @@ -27,11 +27,15 @@ static PyObject * dmnsn_py_dieOnWarnings(PyObject *self, PyObject *args) { - int die; - if (!PyArg_ParseTuple(args, "i", &die)) + PyObject *obj; + if (!PyArg_ParseTuple(args, "O", &obj)) return NULL; - dmnsn_die_on_warnings(die); + int istrue = PyObject_IsTrue(obj); + if (istrue == -1) + return NULL; + + dmnsn_die_on_warnings(istrue); Py_INCREF(Py_None); return Py_None; |