From 6b6dbfd89d9de2e60de5c3092cf56abbcbb02ccc Mon Sep 17 00:00:00 2001 From: Bob Rudis Date: Fri, 24 Mar 2017 09:12:49 -0400 Subject: [PATCH] prep for R 3.4 --- DESCRIPTION | 5 ++--- NAMESPACE | 2 +- R/htmltidy-package.r | 2 +- src/init.c | 22 ++++++++++++++++++++++ 4 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 src/init.c diff --git a/DESCRIPTION b/DESCRIPTION index 6d22294..fc70c88 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: htmltidy Title: Tidy Up and Test XPath Queries on HTML and XML Content -Version: 0.3.1 +Version: 0.3.2 Encoding: UTF-8 Authors@R: c( person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre")), @@ -42,7 +42,6 @@ Depends: R (>= 3.2.0) License: MIT + file LICENSE LazyData: true -Encoding: UTF-8 NeedsCompilation: yes Suggests: testthat, @@ -55,4 +54,4 @@ Imports: XML, htmlwidgets, htmltools -RoxygenNote: 6.0.0 +RoxygenNote: 6.0.1 diff --git a/NAMESPACE b/NAMESPACE index 1e15ffc..862577b 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -22,4 +22,4 @@ import(htmltools) import(htmlwidgets) import(xml2) importFrom(Rcpp,sourceCpp) -useDynLib(htmltidy) +useDynLib(htmltidy, .registration=TRUE) diff --git a/R/htmltidy-package.r b/R/htmltidy-package.r index 818ce83..228cbb5 100644 --- a/R/htmltidy-package.r +++ b/R/htmltidy-package.r @@ -19,7 +19,7 @@ #' @name htmltidy #' @docType package #' @author Bob Rudis (bob@@rud.is) -#' @useDynLib htmltidy +#' @useDynLib htmltidy, .registration=TRUE #' @importFrom Rcpp sourceCpp #' @import xml2 XML htmlwidgets htmltools NULL diff --git a/src/init.c b/src/init.c new file mode 100644 index 0000000..2c0f2e6 --- /dev/null +++ b/src/init.c @@ -0,0 +1,22 @@ +#include +#include +#include // for NULL +#include + +/* FIXME: + Check these declarations against the C/Fortran source code. +*/ + +/* .Call calls */ +extern SEXP htmltidy_tidy_html_int(SEXP, SEXP, SEXP); + +static const R_CallMethodDef CallEntries[] = { + {"htmltidy_tidy_html_int", (DL_FUNC) &htmltidy_tidy_html_int, 3}, + {NULL, NULL, 0} +}; + +void R_init_htmltidy(DllInfo *dll) +{ + R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); + R_useDynamicSymbols(dll, FALSE); +}