[Rcpp-devel] [Rcpp-commits] r277 - pkg/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jan 5 13:05:31 CET 2010


Author: romain
Date: 2010-01-05 13:05:31 +0100 (Tue, 05 Jan 2010)
New Revision: 277

Modified:
   pkg/src/Environment.cpp
Log:
not use variadic template constructs inside the code so that it compiles on GCC < 4.3

Modified: pkg/src/Environment.cpp
===================================================================
--- pkg/src/Environment.cpp	2010-01-05 09:06:53 UTC (rev 276)
+++ pkg/src/Environment.cpp	2010-01-05 12:05:31 UTC (rev 277)
@@ -45,7 +45,6 @@
 }
 
     Environment::Environment( SEXP x = R_GlobalEnv) throw(not_compatible) : RObject::RObject(x){
-	
     	if( ! Rf_isEnvironment(x) ) {
     		
     		/* not an environment, but maybe convertible to one using 
@@ -153,8 +152,15 @@
     	    	    } else{
     	    	    	    /* unless we want to copy all of do_remove, 
     	    	    	       we have to go back to R to do this operation */
-    	    	    	    Language call( ".Internal", 
-    	    	    	    	    Language( "remove", name, m_sexp, false ) 
+    	    	    	    SEXP call = Rf_lang2( 
+    	    	    	    	    Rf_install( ".Internal" ), 
+    	    	    	    	    Rf_lcons( Rf_install( "remove" ), 
+    	    	    	    	    	    Rf_cons( Rf_mkString(name.c_str()), 
+    	    	    	    	    	    	    Rf_cons( m_sexp, 
+    	    	    	    	    	    	    	    Rf_cons( Rf_ScalarLogical( FALSE ), R_NilValue )
+    	    	    	    	    	    	    	    ) 
+    	    	    	    	    	    	    )
+    	    	    	    	    	    )
     	    	    	    	    ) ;
     	    	    	    Rf_eval( call, R_GlobalEnv ) ;
     	    	    }

_______________________________________________
Rcpp-commits mailing list
Rcpp-commits at lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-commits


More information about the Rcpp-devel mailing list