diff --git a/include/with99.h b/include/with99.h index 7f51bdc..97d37bb 100644 --- a/include/with99.h +++ b/include/with99.h @@ -14,7 +14,7 @@ #endif #define WITH99_MAJOR 3 -#define WITH99_MINOR 1 +#define WITH99_MINOR 2 #define WITH99_PATCH 0 #define WITH99_VERSION_COMPATIBLE(x, y, z) (WITH99_MAJOR == (x) && ((WITH99_MINOR == (y) && WITH99_PATCH >= (z)) || (WITH99_MINOR > (y)))) diff --git a/include/with99/defres.h b/include/with99/defres.h index 7cdd9bb..63ba08e 100644 --- a/include/with99/defres.h +++ b/include/with99/defres.h @@ -29,6 +29,13 @@ ML99_just(v((deinit)))\ ) +#define WITH99_resource_VarThrowsExpr_IMPL(type, var, init, deinit, errorexpr) \ + ML99_tuple(\ + ML99_just(v(type var)),\ + ML99_just(v( ((var = init), (errorexpr)) )),\ + ML99_just(v((deinit)))\ + ) + #define WITH99_resource_Call_IMPL(init, deinit) \ ML99_tuple(\ ML99_nothing(),\