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/extent-sampling.sc | 6 ------ src/macros/macros.sc | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/extent-sampling.sc b/src/extent-sampling.sc index 8cddb80..8d3693d 100644 --- a/src/extent-sampling.sc +++ b/src/extent-sampling.sc @@ -27,12 +27,6 @@ (pre-include "utils.h") (pre-include "extent-sampling.h") -(sc-define-syntax (with-vector var size body ...) - (with-alloc var gsl-vector* - (gsl-vector-alloc size) - gsl-vector-free - body ...)) - (sc-define-syntax (with-rstats var body ...) (with-alloc var gsl-rstat-workspace* (gsl-rstat-alloc) gsl-rstat-free 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