Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rf_installChar ? #331

Closed
eddelbuettel opened this issue Jul 24, 2015 · 3 comments
Closed

Rf_installChar ? #331

eddelbuettel opened this issue Jul 24, 2015 · 3 comments

Comments

@eddelbuettel
Copy link
Member

Romain mentioned this the other day (on Twitter?): Rf_installChar(...) instead of Rf_install(CHAR(...)). It appears twice in Symbols.h:

edd@max:~/git/rcpp(master)$ ag install | grep CHAR
inst/include/Rcpp/Symbol.h:46:                SEXP charSym = Rf_install(CHAR(x));     // cannot be gc()'ed  once in symbol table
inst/include/Rcpp/Symbol.h:52:                SEXP charSym = Rf_install( CHAR(STRING_ELT(x, 0 )) ); // cannot be gc()'ed  once in symbol table
edd@max:~/git/rcpp(master)$ 

It comes from here:

------------------------------------------------------------------------
r66478 | luke | 2014-08-26 09:08:28 -0500 (Tue, 26 Aug 2014) | 2 lines

Optimizations of install(CHAR(x)) calls; from Tomas Kalibera.
------------------------------------------------------------------------

so we'd add a dependency on R (>= 3.2.0). Or I guess ... we could #ifdef it.

@jjallaire
Copy link
Member

I'd definitely be against R >= 3.2 as there are just too many packages we'd
be dragging with us.
On Thu, Jul 23, 2015 at 9:15 PM Dirk Eddelbuettel notifications@github.com
wrote:

Romain mentioned this the other day (on Twitter?): Rf_installChar(...)
instead of Rf_install(CHAR(...)). It appears twice in Symbols.h:

edd@max:/git/rcpp(master)$ ag install | grep CHAR
inst/include/Rcpp/Symbol.h:46: SEXP charSym = Rf_install(CHAR(x)); // cannot be gc()'ed once in symbol tableinst/include/Rcpp/Symbol.h:52: SEXP charSym = Rf_install( CHAR(STRING_ELT(x, 0 )) ); // cannot be gc()'ed once in symbol table
edd@max:
/git/rcpp(master)$

It comes from here:


r66478 | luke | 2014-08-26 09:08:28 -0500 (Tue, 26 Aug 2014) | 2 lines

Optimizations of install(CHAR(x)) calls; from Tomas Kalibera.

so we'd add a dependency on R (>= 3.2.0). Or I guess ... we could #ifdef
it.


Reply to this email directly or view it on GitHub
#331.

@eddelbuettel
Copy link
Member Author

Look at the commit if you're near a computer; I have #ifdef-ed this. Should be fine. Passes R-devel; waiting on win-builder ...

@jjallaire
Copy link
Member

Got it, looks good!
On Thu, Jul 23, 2015 at 9:50 PM Dirk Eddelbuettel notifications@github.com
wrote:

Look at the commit
30642ee
if you're near a computer; I have #ifdef-ed this. Should be fine. Passes
R-devel; waiting on win-builder ...


Reply to this email directly or view it on GitHub
#331 (comment).

jjallaire added a commit that referenced this issue Jul 24, 2015
use Rf_installChar() for R 3.2.0 or newer (closes #331)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants