From 71db5f9a7949efd9de43c2f1a5b1a7ef3ef70003 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 25 Aug 2018 00:11:20 +0200 Subject: [PATCH] Support for break to break the execution of M_LET --- m-core.h | 3 ++- tests/test-mcore.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/m-core.h b/m-core.h index 1f0fbb31..652f0757 100644 --- a/m-core.h +++ b/m-core.h @@ -2123,7 +2123,8 @@ m_core_hash (const void *str, size_t length) #define M_LETI_SINGLE2(cont, oplist, name) \ for(M_GET_TYPE oplist name; \ cont && (M_GET_INIT oplist (name), true); \ - (M_GET_CLEAR oplist (name), cont = false)) + (M_GET_CLEAR oplist (name), cont = false)) \ + for(;cont;cont = false) /* Transform the va list by adding their number as the first argument of the list. diff --git a/tests/test-mcore.c b/tests/test-mcore.c index 367218be..bd4e45b1 100644 --- a/tests/test-mcore.c +++ b/tests/test-mcore.c @@ -173,6 +173,8 @@ static void test_let(void) { M_LET(z, M_CLASSIC_OPLIST(testobj)) { testobj_add(z,z,z); + break; + assert(0); } }