aboutsummaryrefslogtreecommitdiff
path: root/src/macros
diff options
context:
space:
mode:
authorArun Isaac2021-05-07 16:44:20 +0530
committerArun Isaac2021-05-07 17:04:11 +0530
commitc517ae401221da5b495fbd7b815bbafc0f087da9 (patch)
tree91a03486e782ef31db17af592c9fd916ec70c596 /src/macros
parentcd506874cbd25801b90ba4ce8a3dff1041865e8a (diff)
downloadnsmc-c517ae401221da5b495fbd7b815bbafc0f087da9.tar.gz
nsmc-c517ae401221da5b495fbd7b815bbafc0f087da9.tar.lz
nsmc-c517ae401221da5b495fbd7b815bbafc0f087da9.zip
Move with-vector to macros.sc.
* src/extent-sampling.sc (with-vector): Move to ... * src/macros/macros.sc (with-vector): ... here.
Diffstat (limited to 'src/macros')
-rw-r--r--src/macros/macros.sc6
1 files changed, 6 insertions, 0 deletions
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 ...))