1616# along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
1717
1818internal_function <- function (pointer ){
19- f <- function (xp ){
20- force(xp )
21- function (... ){
22- .External( InternalFunction_invoke , xp , ... )
23- }
24- }
25- o <- new( " C++Function" , f(pointer ) )
26- o @ pointer <- pointer
27- o
19+ f <- function (xp ){
20+ force(xp )
21+ function (... ){
22+ .External( InternalFunction_invoke , xp , ... )
23+ }
24+ }
25+ o <- new( " C++Function" , f(pointer ) )
26+ o @ pointer <- pointer
27+ o
2828}
2929
3030setMethod ("$ ", "C++Class", function(x, name) {
@@ -42,8 +42,8 @@ setMethod("$", "C++Class", function(x, name) {
4242.getModulePointer <- function (module , mustStart = TRUE ) {
4343 pointer <- get(" pointer" , envir = as.environment(module ))
4444 if (is.null(pointer ) && mustStart ) {
45- # # should be (except for bug noted in identical())
46- # # if(identical(pointer, .badModulePointer) && mustStart) {
45+ # # should be (except for bug noted in identical())
46+ # # if(identical(pointer, .badModulePointer) && mustStart) {
4747 Module(module , mustStart = TRUE ) # will either initialize pointer or throw error
4848 pointer <- get(" pointer" , envir = as.environment(module ))
4949 }
@@ -438,15 +438,15 @@ cpp_fields <- function( CLASS, where){
438438.CppClassName <- function (name )
439439 paste0(" Rcpp_" ,name )
440440
441- copy <- function ( obj ){
442- .Call(copy_constructor , obj $ .cppclass , obj $ .pointer )
441+ copyObject <- function ( obj ){
442+ .Call(copy_constructor , obj $ .cppclass , obj $ .pointer )
443443}
444444
445445destruct <- function (obj ){
446- .Call(destructor , obj $ .cppclass , obj $ .pointer )
447- invisible (NULL )
446+ .Call(destructor , obj $ .cppclass , obj $ .pointer )
447+ invisible (NULL )
448448}
449449
450450is_destructed <- function (obj ){
451- .Call(is_destructed_impl , obj $ .pointer )
451+ .Call(is_destructed_impl , obj $ .pointer )
452452}
0 commit comments