From 732ac0e3d8ccc7f35c615874d40f65b5a7807364 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Sat, 20 Jun 2020 08:07:22 +0200 Subject: [PATCH 08/21] python: add macro for early return (#44287) --- bindings/python/wrapper_top.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bindings/python/wrapper_top.c b/bindings/python/wrapper_top.c index 67502918..2867a893 100644 --- a/bindings/python/wrapper_top.c +++ b/bindings/python/wrapper_top.c @@ -73,6 +73,8 @@ void PyErr_WarnFormat(PyObject *category, int stacklevel, const char *format, .. } #endif +#define RETURN_IF_FAIL(op) do { if (! (op)) { return NULL; } } while(0) + GQuark lasso_wrapper_key; -- 2.26.2