1 #include <Rinternals.h>
2 #include <R_ext/Rdynload.h>
3 #include <R_ext/Visibility.h>
4 #include "extensions/cmark-gfm-core-extensions.h"
5 
6 extern SEXP R_list_extensions();
7 extern SEXP R_render_markdown(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
8 
9 static const R_CallMethodDef CallEntries[] = {
10   {"R_list_extensions", (DL_FUNC) &R_list_extensions, 0},
11   {"R_render_markdown", (DL_FUNC) &R_render_markdown, 8},
12   {NULL, NULL, 0}
13 };
14 
R_init_commonmark(DllInfo * dll)15 attribute_visible void R_init_commonmark(DllInfo *dll){
16   cmark_gfm_core_extensions_ensure_registered();
17   R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
18   R_useDynamicSymbols(dll, FALSE);
19   R_forceSymbols(dll, TRUE);
20 }
21