python: add macro for early return (#44287)

This commit is contained in:
Benjamin Dauvergne 2020-06-20 08:07:22 +02:00
parent 05dea2eab5
commit 35682272ec
1 changed files with 2 additions and 0 deletions

View File

@ -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;