From 906e2981839d2bd1be76ffb2263a8a0ce8ef8050 Mon Sep 17 00:00:00 2001 From: Edzer Pebesma Date: Mon, 24 Apr 2017 20:42:08 +0200 Subject: [PATCH 1/2] bump version, add bugreports url --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 433ca26..fc0ba8e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,12 +1,12 @@ Package: udunits2 Type: Package Title: Udunits-2 Bindings for R -Version: 0.13 -Date: 2016-11-16 +Version: 0.14 Author: James Hiebert Maintainer: James Hiebert Description: Provides simple bindings to Unidata's udunits library. URL: https://github.com/pacificclimate/Rudunits2 https://www.unidata.ucar.edu/software/udunits/ +BugReports: https://github.com/pacificclimate/Rudunits2/issues/ SystemRequirements: udunits-2 License: GPL-2 LazyLoad: yes From 256b85400814449752f13eb2762d3d70d6825ca7 Mon Sep 17 00:00:00 2001 From: Edzer Pebesma Date: Mon, 24 Apr 2017 20:43:54 +0200 Subject: [PATCH 2/2] add native routine registration see https://stat.ethz.ch/pipermail/r-devel/2017-February/073755.html --- src/init.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/init.c diff --git a/src/init.c b/src/init.c new file mode 100644 index 0000000..e506a42 --- /dev/null +++ b/src/init.c @@ -0,0 +1,34 @@ +#include // for NULL +#include + +/* FIXME: + Check these declarations against the C/Fortran source code. +*/ + +/* .C calls */ +extern void R_ut_are_convertible(void *, void *, void *); +extern void R_ut_convert(void *, void *, void *, void *, void *); +extern void R_ut_get_name(void *, void *); +extern void R_ut_get_symbol(void *, void *); +extern void R_ut_has_system(void *); +extern void R_ut_init(void *); +extern void R_ut_is_parseable(void *, void *); +extern void R_ut_set_encoding(void *); + +static const R_CMethodDef CEntries[] = { + {"R_ut_are_convertible", (DL_FUNC) &R_ut_are_convertible, 3}, + {"R_ut_convert", (DL_FUNC) &R_ut_convert, 5}, + {"R_ut_get_name", (DL_FUNC) &R_ut_get_name, 2}, + {"R_ut_get_symbol", (DL_FUNC) &R_ut_get_symbol, 2}, + {"R_ut_has_system", (DL_FUNC) &R_ut_has_system, 1}, + {"R_ut_init", (DL_FUNC) &R_ut_init, 1}, + {"R_ut_is_parseable", (DL_FUNC) &R_ut_is_parseable, 2}, + {"R_ut_set_encoding", (DL_FUNC) &R_ut_set_encoding, 1}, + {NULL, NULL, 0} +}; + +void R_init_udunits2(DllInfo *dll) +{ + R_registerRoutines(dll, CEntries, NULL, NULL, NULL); + R_useDynamicSymbols(dll, FALSE); +}