From a7f3d3436f7b1f2acf43eb1509bac539eaabef16 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Mon, 24 Jun 2019 22:02:37 -0400 Subject: [PATCH] Update CHANGELOG.md Also change `with-resource` to `with`. --- CHANGELOG.md | 3 +++ src/boot/boot.janet | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e8a4855..db8346a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to this project will be documented in this file. ## Unreleased +- Add `with` macro for resource handling. +- Add `propagate` function so we can "rethrow" signals after they are + intercepted. This makes signals even more flexible. - Add `JANET_NO_DOCSTRINGS` and `JANET_NO_SOURCEMAPS` defines in janetconf.h for shrinking binary size. This seems to save about 50kB in most builds, so it's not usually worth it. diff --git a/src/boot/boot.janet b/src/boot/boot.janet index 8582abe1..ba67c55f 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -263,7 +263,7 @@ (++ i)) ~(let (,;accum) ,;body)) -(defmacro with-resource +(defmacro with "Evaluate body with some resource, which will be automatically cleaned up if there is an error in body. binding is bound to the expression ctor, and dtor is a function or callable that is passed the binding. If no destructor