1 #include <R.h>
2 #include <Rdefines.h>
3 #include <Rinternals.h>
4 #include <R_ext/Rdynload.h>
5 
6 #include "funcs.h"
7 
8 static const R_CMethodDef cMethods[] = {
9 	{"fromJSON", (DL_FUNC) &fromJSON, 3},
10 	{"toJSON", (DL_FUNC) &toJSON, 1},
11 	{NULL, NULL, 0}
12 };
13 
R_init_rjson(DllInfo * info)14 void R_init_rjson(DllInfo* info) {
15 	R_registerRoutines(info, cMethods, NULL, NULL, NULL);
16 
17 	// TODO this should be changed to FALSE to disable
18 	// as per note on https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-clang/rjson-00check.html
19 	R_useDynamicSymbols(info, TRUE);
20 }
21