Skip to content

Commit fe59a06

Browse files
improved SUGAR_MATH_1 macro
1 parent 88c17e0 commit fe59a06

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

ChangeLog

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55

66
2010-11-04 Romain Francois <romain@r-enthusiasts.com>
77

8-
* inst/Rcpp/Module.h: experimental way to specify which constructor
8+
* inst/include/Rcpp/Module.h: experimental way to specify which constructor
99
to use in classes exposed by modules. This is still too restrictive
1010
as it only allows one constructor.
11+
12+
* inst/include/Rcpp/sugar/block/SugarMath.h: extend the SUGAR_MATH_1 macro
13+
so that we can apply functions (e.g. sqrt) directly on SEXP
1114

1215
2010-11-01 Dirk Eddelbuettel <edd@debian.org>
1316

@@ -60,7 +63,7 @@
6063
2010-10-20 Dirk Eddelbuettel <edd@debian.org>
6164

6265
* include/Rcpp/XPtr.h: Applied patch by Karl Millar
63-
* include/Rcpp/vector/Vector.h): Idem
66+
* include/Rcpp/vector/Vector.h: Idem
6467

6568
2010-10-19 Dirk Eddelbuettel <edd@debian.org>
6669

inst/include/Rcpp/sugar/block/SugarMath.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ Rcpp::VectorBase<
108108
&__SYMBOL__ , t \
109109
) ; \
110110
} \
111+
inline sugar::SugarMath_1<true,double,double,NumericVector,double(*)(double)> \
112+
__NAME__( SEXP x){ return __NAME__( NumericVector( x ) ) ; } \
111113
template <bool NA, typename T> \
112114
inline sugar::SugarMath_1<NA,double,int,T, double (*)(double) > \
113115
__NAME__( \

0 commit comments

Comments
 (0)