diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2017-12-15 17:25:50 -0500 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2017-12-15 17:25:50 -0500 |
| commit | db0755d027f0f88568909e16b715c8e769333390 (patch) | |
| tree | 097a1398c608bb8e6d710efe6187d6ae99dd7db0 | |
| parent | add unit test for runif rng (diff) | |
| download | SyncRNG-db0755d027f0f88568909e16b715c8e769333390.tar.gz SyncRNG-db0755d027f0f88568909e16b715c8e769333390.zip | |
fix warnings from R about routine registration
| -rw-r--r-- | src/syncrng.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/syncrng.c b/src/syncrng.c index 8957047..8a0b5b4 100644 --- a/src/syncrng.c +++ b/src/syncrng.c @@ -11,6 +11,7 @@ #include <R.h> #include <Rinternals.h> #include <R_ext/Random.h> +#include <R_ext/Rdynload.h> #endif /** @@ -221,6 +222,24 @@ initsyncrng(void) * */ +SEXP R_syncrng_seed(SEXP seed); +SEXP R_syncrng_rand(SEXP state); + +R_CallMethodDef callMethods[] = { + {"R_syncrng_seed", (DL_FUNC) &R_syncrng_seed, 1}, + {"R_syncrng_rand", (DL_FUNC) &R_syncrng_seed, 1}, + {NULL, NULL, 0} +}; +R_CMethodDef cMethods[] = { + {NULL, NULL, 0} +}; + +void R_init_myLib(DllInfo *info) +{ + R_registerRoutines(info, cMethods, callMethods, NULL, NULL); + R_useDynamicSymbols(info, TRUE); +} + // Set the seed for the generator from the reference class SEXP R_syncrng_seed(SEXP seed) { |
