aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2021-05-07 16:44:20 +0530
committerArun Isaac2021-05-07 17:04:11 +0530
commitc517ae401221da5b495fbd7b815bbafc0f087da9 (patch)
tree91a03486e782ef31db17af592c9fd916ec70c596
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.
-rw-r--r--src/extent-sampling.sc6
-rw-r--r--src/macros/macros.sc6
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 ...))