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

Address #928: enable global Rcout/Rcerr via RCPP_USE_GLOBAL_ROSTREAM #1139

Merged
merged 7 commits into from
Feb 1, 2021

Conversation

Enchufa2
Copy link
Member

@Enchufa2 Enchufa2 commented Jan 28, 2021

I think I got it. I've identified two places in attributes.cpp for the initialization that I believe cover all the cases. The new behaviour is enabled for Rcpp, but disabled by default for Rcpp users, guarded by RCPP_USE_GLOBAL_ROSTREAM. All tests pass with and without setting this in ~/.R/Makevars.

Checklist

  • Code compiles correctly
  • R CMD check still passes all tests
  • Prefereably, new tests were added which fail without the change
  • Document the changes by file in ChangeLog

inst/include/Rcpp/iostream/Rstreambuf.h Outdated Show resolved Hide resolved
src/api.cpp Outdated Show resolved Hide resolved
src/attributes.cpp Outdated Show resolved Hide resolved
DESCRIPTION Outdated Show resolved Hide resolved
src/rcpp_init.cpp Outdated Show resolved Hide resolved
Copy link
Member

@eddelbuettel eddelbuettel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks pretty clean. I put two minor comments / questions in.

ChangeLog Outdated Show resolved Hide resolved
src/api.cpp Show resolved Hide resolved
@Enchufa2
Copy link
Member Author

Looking into those unit tests.

@eddelbuettel
Copy link
Member

I'll take a look later -- thanks a bunch for cooking up a test.

Copy link
Member

@eddelbuettel eddelbuettel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me but I'll probably let it sit here for a moment to let @kevinushey pipe in too.

@eddelbuettel
Copy link
Member

The test is nice work, by the way. Apart from the gawdawful two space indenting, of course 😉

@eddelbuettel
Copy link
Member

Ok, I'll wait til 'end of day' in whatever suitable time zone to see if @kevinushey has a comment.

Copy link
Contributor

@kevinushey kevinushey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! LGTM.

@eddelbuettel eddelbuettel merged commit fe8e3b1 into RcppCore:master Feb 1, 2021
@Enchufa2 Enchufa2 deleted the fix/Rostreams branch February 1, 2021 21:46
@Enchufa2 Enchufa2 mentioned this pull request Oct 13, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants