Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2016-04-11 Ben Goodrich <goodrich.ben@gmail.com>
* R/Module.R: Avoid calling as.character() on a C++Object to prevent race

2016-04-02 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION: Rolled to minor version 0.12.4.3
Expand Down
6 changes: 3 additions & 3 deletions R/Module.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ setMethod("initialize", "Module",

.get_Module_Class <- function( x, name, pointer = .getModulePointer(x) ){
value <- .Call( Module__get_class, pointer, name )
value@generator <- get("refClassGenerators",envir=x)[[as.character(value)]]
value@generator <- get("refClassGenerators", envir=x)[[value@.Data]]
value
}

Expand Down Expand Up @@ -215,7 +215,7 @@ Module <- function( module, PACKAGE = methods::getPackageName(where), where = to
for( i in seq_along(classes) ){
CLASS <- classes[[i]]

clname <- as.character(CLASS)
clname <- CLASS@.Data

fields <- cpp_fields( CLASS, where )
methods <- cpp_refMethods(CLASS, where)
Expand Down Expand Up @@ -276,7 +276,7 @@ Module <- function( module, PACKAGE = methods::getPackageName(where), where = to

for( i in seq_along(classes) ){
CLASS <- classes[[i]]
clname <- as.character(CLASS)
clname <- CLASS@.Data
demangled_name <- sub( "^Rcpp_", "", clname )
.classes_map[[ CLASS@typeid ]] <- storage[[ demangled_name ]] <- .get_Module_Class( module, demangled_name, xp )

Expand Down