From c517ae401221da5b495fbd7b815bbafc0f087da9 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 7 May 2021 16:44:20 +0530 Subject: Move with-vector to macros.sc. * src/extent-sampling.sc (with-vector): Move to ... * src/macros/macros.sc (with-vector): ... here. --- src/macros/macros.sc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/macros') diff --git a/src/macros/macros.sc b/src/macros/macros.sc index 5c0d578..a921f75 100644 --- a/src/macros/macros.sc +++ b/src/macros/macros.sc @@ -42,3 +42,9 @@ (let* ((var type allocate)) body ... (free var))) + +(sc-define-syntax (with-vector var size body ...) + (with-alloc var gsl-vector* + (gsl-vector-alloc size) + gsl-vector-free + body ...)) -- cgit v1.2.3