It is bad to put a function call inside a macro - it might be evaluated more than once
diff --git a/src/util.c b/src/util.c
index b1faad5..2ce370d 100644
--- a/src/util.c
+++ b/src/util.c
@@ -54,6 +54,7 @@
 void
 flush_error_queue(void)
 {
-    Py_DECREF(error_queue_to_list());
+    PyObject *list = error_queue_to_list();
+    Py_DECREF(list);
 }