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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Dec 29 17:27:26 CET 2009


Author: romain
Date: 2009-12-29 17:27:26 +0100 (Tue, 29 Dec 2009)
New Revision: 225

Modified:
   pkg/src/RcppXPtr.h
Log:
small code duplication

Modified: pkg/src/RcppXPtr.h
===================================================================
--- pkg/src/RcppXPtr.h	2009-12-29 16:10:29 UTC (rev 224)
+++ pkg/src/RcppXPtr.h	2009-12-29 16:27:26 UTC (rev 225)
@@ -89,16 +89,6 @@
   		
 };
 
-
-template <typename T>
-void delete_finalizer(SEXP p) {
-	if( TYPEOF(p) == EXTPTRSXP ){
-		T* ptr = (T*) EXTPTR_PTR(p) ;
-		delete ptr ;
-	}
-}
-
-
 template<typename T>
 RcppXPtr<T>::RcppXPtr(T* p, bool set_delete_finalizer = true) : RcppSexp::RcppSexp() {
 	m_sexp = R_MakeExternalPtr( (void*)p , R_NilValue, R_NilValue) ;

_______________________________________________
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