| 1 | // Generated by cpp11: do not edit by hand |
| 2 | // clang-format off |
| 3 | |
| 4 | #include "jinjar_types.h" |
| 5 | #include "cpp11/declarations.hpp" |
| 6 | #include <R_ext/Visibility.h> |
| 7 | |
| 8 | // render.cpp |
| 9 | cpp11::external_pointer<jinjar::Template> parse_(const cpp11::strings& input, const cpp11::list& config); |
| 10 | extern "C" SEXP _jinjar_parse_(SEXP input, SEXP config) { |
| 11 | BEGIN_CPP11 |
| 12 | return cpp11::as_sexp(parse_(cpp11::as_cpp<cpp11::decay_t<const cpp11::strings&>>(input), cpp11::as_cpp<cpp11::decay_t<const cpp11::list&>>(config))); |
| 13 | END_CPP11 |
| 14 | } |
| 15 | // render.cpp |
| 16 | cpp11::strings render_(cpp11::external_pointer<jinjar::Template> input, const cpp11::strings& data_json); |
| 17 | extern "C" SEXP _jinjar_render_(SEXP input, SEXP data_json) { |
| 18 | BEGIN_CPP11 |
| 19 | return cpp11::as_sexp(render_(cpp11::as_cpp<cpp11::decay_t<cpp11::external_pointer<jinjar::Template>>>(input), cpp11::as_cpp<cpp11::decay_t<const cpp11::strings&>>(data_json))); |
| 20 | END_CPP11 |
| 21 | } |
| 22 | |
| 23 | extern "C" { |
| 24 | static const R_CallMethodDef CallEntries[] = { |
| 25 | {"_jinjar_parse_", (DL_FUNC) &_jinjar_parse_, 2}, |
| 26 | {"_jinjar_render_", (DL_FUNC) &_jinjar_render_, 2}, |
| 27 | {NULL, NULL, 0} |
| 28 | }; |
| 29 | } |
| 30 | |
| 31 | extern "C" attribute_visible void R_init_jinjar(DllInfo* dll){ |
| 32 | R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); |
| 33 | R_useDynamicSymbols(dll, FALSE); |
| 34 | R_forceSymbols(dll, TRUE); |
| 35 | } |