[Rcpp-commits] r1048 - pkg/Rcpp/src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Apr 15 10:59:14 CEST 2010
Author: romain
Date: 2010-04-15 10:59:14 +0200 (Thu, 15 Apr 2010)
New Revision: 1048
Modified:
pkg/Rcpp/src/do_dot_cpp.cpp
Log:
fixed error about zero arguments .Call routines
Modified: pkg/Rcpp/src/do_dot_cpp.cpp
===================================================================
--- pkg/Rcpp/src/do_dot_cpp.cpp 2010-04-15 08:54:15 UTC (rev 1047)
+++ pkg/Rcpp/src/do_dot_cpp.cpp 2010-04-15 08:59:14 UTC (rev 1048)
@@ -61,8 +61,8 @@
- the second argument is the external pointer to the function */
SEXP p = CDR(CDDR(args)) ;
if( p == R_NilValue ){
- if( ::Rf_isNull( np ) || INTEGER(np)[0] != 0 ){
- ::Rf_error( "incorrect number of arguments" ) ;
+ if( ! ::Rf_isNull( np ) && INTEGER(np)[0] != 0 ){
+ ::Rf_error( "the registered routine expects no arguments" ) ;
}
/* no arguments, simple case */
try{
More information about the Rcpp-commits
mailing list