aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/aggregate.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/aggregate.i')
-rw-r--r--Examples/test-suite/aggregate.i2
1 files changed, 1 insertions, 1 deletions
diff --git a/Examples/test-suite/aggregate.i b/Examples/test-suite/aggregate.i
index dc00f0605..8ac31ece7 100644
--- a/Examples/test-suite/aggregate.i
+++ b/Examples/test-suite/aggregate.i
@@ -6,7 +6,7 @@
To support contracts, you need to add a macro to the runtime.
For Python, it looks like this:
-#define SWIG_contract_assert(expr, msg) if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg #expr ); goto fail; } else
+#define SWIG_contract_assert(expr, msg) do { if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg #expr ); goto fail; } } while (0)
Note: It is used like this:
SWIG_contract_assert(x == 1, "Some kind of error message");