[Rcpp-commits] r4244 - in pkg/Rcpp: . inst/include/Rcpp

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Feb 5 15:36:49 CET 2013


Author: romain
Date: 2013-02-05 15:36:48 +0100 (Tue, 05 Feb 2013)
New Revision: 4244

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/inst/include/Rcpp/XPtr.h
Log:
cleaning

Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2013-02-05 14:24:36 UTC (rev 4243)
+++ pkg/Rcpp/ChangeLog	2013-02-05 14:36:48 UTC (rev 4244)
@@ -1,7 +1,8 @@
 2013-02-05 Romain Francois <romain at r-enthusiasts.com>
 
         * include/Rcpp/vector/string_proxy.h : more wstring support 
-        * include/Rcpp/XPtr.h : more debugging
+        * include/Rcpp/XPtr.h : more debugging. removed delete_finalizer which is 
+        no longer used
         
 2013-02-05 JJ Allaire <jj at rstudio.org>
 

Modified: pkg/Rcpp/inst/include/Rcpp/XPtr.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/XPtr.h	2013-02-05 14:24:36 UTC (rev 4243)
+++ pkg/Rcpp/inst/include/Rcpp/XPtr.h	2013-02-05 14:36:48 UTC (rev 4244)
@@ -2,7 +2,7 @@
 //
 // XPtr.h: Rcpp R/C++ interface class library -- smart external pointers
 //
-// Copyright (C) 2009 - 2011	Dirk Eddelbuettel and Romain Francois
+// Copyright (C) 2009 - 2013	Dirk Eddelbuettel and Romain Francois
 //
 // This file is part of Rcpp.
 //
@@ -27,15 +27,6 @@
 namespace Rcpp{
     
 template <typename T>
-void delete_finalizer(SEXP p){
-    if( TYPEOF(p) == EXTPTRSXP ){
-	T* ptr = (T*) R_ExternalPtrAddr(p) ;
-	RCPP_DEBUG_3( "delete_finalizer<%s>(SEXP p = <%p>). ptr = %p", DEMANGLE(T), p, ptr  )
-	delete ptr ;
-    }
-}
-
-template <typename T>
 void standard_delete_finalizer(T* obj){
     delete obj ;   
 }
@@ -44,6 +35,7 @@
 void finalizer_wrapper(SEXP p){
     if( TYPEOF(p) == EXTPTRSXP ){
 	T* ptr = (T*) R_ExternalPtrAddr(p) ;
+	RCPP_DEBUG_3( "finalizer_wrapper<%s>(SEXP p = <%p>). ptr = %p", DEMANGLE(T), p, ptr  )
 	Finalizer(ptr) ;
     }
 }



More information about the Rcpp-commits mailing list