root/root-r.patch
Mattias Ellert 03696fac62 Update to 6.30.08
Fixes for TUri class (PCRE2 compatibility)
Update ROOT's R interface for Rcpp 1.0.13
2024-07-23 01:46:15 +02:00

32 lines
973 B
Diff

From 141f62e800bfc54d2fdf76c0750dc6082d00910d Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Sun, 21 Jul 2024 23:09:54 +0200
Subject: [PATCH] Update ROOT's R interface for Rcpp 1.0.13
---
bindings/r/inc/TRInternalFunction.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/bindings/r/inc/TRInternalFunction.h b/bindings/r/inc/TRInternalFunction.h
index d9bf532205..fa77cbddbc 100644
--- a/bindings/r/inc/TRInternalFunction.h
+++ b/bindings/r/inc/TRInternalFunction.h
@@ -31,7 +31,15 @@ public:
RCPP_GENERATE_CTOR_ASSIGN(TRInternalFunction_Impl)
+#if RCPP_VERSION >= Rcpp_Version(1,0,13)
+ template <typename OUT, typename... T>
+ TRInternalFunction_Impl(OUT(*fun)(T...))
+ {
+ set(Rcpp::XPtr< Rcpp::CppFunctionN<OUT, T...> >(new Rcpp::CppFunctionN<OUT, T...>(fun), false));
+ }
+#else
#include <TRInternalFunction__ctors.h>
+#endif
void update(SEXP) {}
private:
--
2.45.2