Skip to content

Commit 4a683ea

Browse files
committed
Merge pull request #353 from RcppCore/feature/module-load
Feature/module load
2 parents 0d27ef3 + e462cf5 commit 4a683ea

File tree

5 files changed

+16
-7
lines changed

5 files changed

+16
-7
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
* inst/unitTests/cpp/Module.cpp: Rename 'World' to 'ModuleWorld'
2121
* inst/unitTests/runit.Module.R (test.Module): Ditto
2222

23+
2015-08-25 Kurt Hornik <[email protected]>
24+
25+
* R/loadModule.R: For now=TRUE, always set .botched to FALSE which
26+
corresponds to the case of the methods package being in the search path
27+
* inst/include/Rcpp/Reference.h: Call call with the internal Namespace
28+
2329
2015-08-24 Dirk Eddelbuettel <[email protected]>
2430

2531
* vignettes/Rcpp.bib: Updated R / R Core references

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: Rcpp
22
Title: Seamless R and C++ Integration
3-
Version: 0.12.0.3
3+
Version: 0.12.0.4
44
Date: 2015-08-26
55
Author: Dirk Eddelbuettel, Romain Francois, JJ Allaire, Kevin Ushey,
66
Qiang Kou, Douglas Bates and John Chambers

R/loadModule.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2010 - 2012 John Chambers, Dirk Eddelbuettel and Romain Francois
1+
# Copyright (C) 2010 - 2015 John Chambers, Dirk Eddelbuettel and Romain Francois
22
#
33
# This file is part of Rcpp.
44
#
@@ -67,7 +67,9 @@ loadModule <- function( module, what = character(), loadNow,
6767
loadNow <- !is(loadM, "error")
6868
}
6969
if(loadNow) {
70-
.botched <- isBotchedSession()
70+
## .botched <- isBotchedSession()
71+
.botched <- FALSE
72+
7173
if(is.null(loadM))
7274
loadM <- tryCatch(Module( module, mustStart = TRUE, where = env ),
7375
error = function(e)e)

inst/NEWS.Rd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
\itemize{
2424
\item We no longer define multiple Modules objects named \code{World} in
2525
the unit tests with was seen to have a bad effect with R 3.2.2 or later.
26+
\item Applied patch by Kurt Hornik which improves how Rcpp loads Modules
2627
}
2728
}
2829
}

inst/include/Rcpp/Reference.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// Reference.h: Rcpp R/C++ interface class library -- Reference class objects
44
//
5-
// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
5+
// Copyright (C) 2010 - 2015 Dirk Eddelbuettel and Romain Francois
66
//
77
// This file is part of Rcpp.
88
//
@@ -59,15 +59,15 @@ namespace Rcpp{
5959
Reference_Impl( const std::string& klass ) {
6060
SEXP newSym = Rf_install("new");
6161
Shield<SEXP> call( Rf_lang2( newSym, Rf_mkString( klass.c_str() ) ) );
62-
Storage::set__( Rcpp_eval( call ) ) ;
62+
Storage::set__( Rcpp_eval( call , Rcpp::internal::get_Rcpp_namespace()) );
6363
}
6464

6565
void update( SEXP x){
66-
if( ! ::Rf_isS4(x) ) throw not_reference() ;
66+
if( ! ::Rf_isS4(x) ) throw not_reference();
6767
}
6868
} ;
6969

70-
typedef Reference_Impl<PreserveStorage> Reference ;
70+
typedef Reference_Impl<PreserveStorage> Reference;
7171

7272
} // namespace Rcpp
7373

0 commit comments

Comments
 (0)