Skip to content

Commit

Permalink
Added init.c containing code to register Rcpp routines.
Browse files Browse the repository at this point in the history
  • Loading branch information
pcarbo committed May 31, 2017
1 parent 125778b commit 35cb69b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/init.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include <stdlib.h>
#include <Rinternals.h>
#include <R_ext/Rdynload.h>
#include <R_ext/Visibility.h>

// Declarations for .Call entry points.
SEXP ashr_cxxMixSquarem (SEXP matrix_likSEXP, SEXP priorSEXP,
SEXP pi_initSEXP, SEXP controlSEXP);

// See "Registering native routines" in "Writing R Extensions" manual
// for an explanation of what these lines of code do.
#define CALLDEF(name, n) {#name, (DL_FUNC) &name, n}

const static R_CallMethodDef R_CallDef[] = {
CALLDEF(ashr_cxxMixSquarem,4),
{NULL, NULL, 0}
};

void attribute_visible R_init_varbvs(DllInfo *dll)
{
R_registerRoutines(dll,NULL,R_CallDef,NULL,NULL);
R_useDynamicSymbols(dll,FALSE);
R_forceSymbols(dll,TRUE);
}

0 comments on commit 35cb69b

Please sign in to comment.