[Rcpp-devel] Typo in macro UNPACK_EXTERNAL_ARGS (Module.cpp)

QRD qrd at sig.com
Thu Jun 13 10:27:26 CEST 2013


Hi,

Minor typo in the macro UNPACK_EXTERNAL_ARGS in Module.cpp; all existing
callers don't notice because they use the variable 'p' but it might trip
someone up in future.

Thanks,

Ben.

- - - - 8< - - - - [Also attached in case email mangles whitespace.]

diff -rU4 Rcpp-orig/src/Module.cpp Rcpp-patched/src/Module.cpp
--- Rcpp-orig/src/Module.cpp    2013-03-23 14:53:30.000000000 +0000
+++ Rcpp-patched/src/Module.cpp 2013-06-13 09:22:06.486206400 +0100
@@ -27,9 +27,9 @@
 #define UNPACK_EXTERNAL_ARGS(__CARGS__,__P__)    \
 SEXP __CARGS__[MAX_ARGS] ;                       \
 int nargs = 0 ;                                  \
 for(; nargs<MAX_ARGS; nargs++){                  \
-       if( p == R_NilValue ) break ;                \
+       if( __P__ == R_NilValue ) break ;            \
        __CARGS__[nargs] = CAR(__P__) ;              \
        __P__ = CDR(__P__) ;                         \
 }

-------------- next part --------------
A non-text attachment was scrubbed...
Name: UNPACK_EXTERNAL_ARGS-typo.patch
Type: application/octet-stream
Size: 623 bytes
Desc: UNPACK_EXTERNAL_ARGS-typo.patch
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130613/1824eb47/attachment-0001.obj>


More information about the Rcpp-devel mailing list