[Rcpp-commits] r1134 - in pkg: Rcpp/inst/include/Rcpp Rcpp/src RcppArmadillo/inst/unitTests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun May 2 13:19:01 CEST 2010
Author: romain
Date: 2010-05-02 13:19:01 +0200 (Sun, 02 May 2010)
New Revision: 1134
Removed:
pkg/Rcpp/src/clone.cpp
Modified:
pkg/Rcpp/inst/include/Rcpp/clone.h
pkg/RcppArmadillo/inst/unitTests/runTests.R
Log:
move clone(SEXP) to headers
Modified: pkg/Rcpp/inst/include/Rcpp/clone.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/clone.h 2010-05-02 10:49:27 UTC (rev 1133)
+++ pkg/Rcpp/inst/include/Rcpp/clone.h 2010-05-02 11:19:01 UTC (rev 1134)
@@ -34,7 +34,9 @@
SEXP x = object ;
return T( Rf_duplicate( x ) ) ;
}
-template<> SEXP clone(SEXP object) ;
+template<> inline SEXP clone(SEXP object){
+ return ::Rf_duplicate( object ) ;
+}
} // namespace Rcpp
Deleted: pkg/Rcpp/src/clone.cpp
===================================================================
--- pkg/Rcpp/src/clone.cpp 2010-05-02 10:49:27 UTC (rev 1133)
+++ pkg/Rcpp/src/clone.cpp 2010-05-02 11:19:01 UTC (rev 1134)
@@ -1,31 +0,0 @@
-// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
-//
-// clone.cpp: Rcpp R/C++ interface class library -- clone SEXP
-//
-// Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois
-//
-// This file is part of Rcpp.
-//
-// Rcpp is free software: you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// Rcpp is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
-
-#include <Rcpp/clone.h>
-
-namespace Rcpp{
-
-template<> SEXP clone( SEXP object){
- return Rf_duplicate( object ) ;
-}
-
-} // namespace Rcpp
-
Modified: pkg/RcppArmadillo/inst/unitTests/runTests.R
===================================================================
--- pkg/RcppArmadillo/inst/unitTests/runTests.R 2010-05-02 10:49:27 UTC (rev 1133)
+++ pkg/RcppArmadillo/inst/unitTests/runTests.R 2010-05-02 11:19:01 UTC (rev 1134)
@@ -82,7 +82,7 @@
stop( sprintf( "unit test problems: %d failures, %d errors", err$nFail, err$nErr) )
} else{
success <- err$nTestFunc - err$nFail - err$nErr - err$nDeactivated
- cat( sprintf( "%d / %d", success, err$nTestFunc ) )
+ cat( sprintf( "%d / %d\n", success, err$nTestFunc ) )
}
}
} else {
More information about the Rcpp-commits
mailing list