diff options
Diffstat (limited to 'src/macros')
-rw-r--r-- | src/macros/macros.sc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/macros/macros.sc b/src/macros/macros.sc index a921f75..cf6be15 100644 --- a/src/macros/macros.sc +++ b/src/macros/macros.sc @@ -48,3 +48,8 @@ (gsl-vector-alloc size) gsl-vector-free body ...)) + +(sc-define-syntax (with-rng var body ...) + (with-alloc var gsl-rng* + (gsl-rng-alloc gsl-rng-default) gsl-rng-free + body ...)) |