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

undef FALSE in Timer #847

Merged
merged 1 commit into from Apr 25, 2018

Conversation

Projects
None yet
2 participants
@romainfrancois
Copy link
Contributor

romainfrancois commented Apr 25, 2018

which seems to confuse R_useDynamicSymbols in some situations. closes #846

@romainfrancois

This comment has been minimized.

Copy link
Contributor Author

romainfrancois commented Apr 25, 2018

it might make sense to remove dependencies on NumericVector and CharacterVector in the operator SEXP as well, so that this file could be included without Rcpp.h

operator SEXP() const {
            size_t n = data.size();
            NumericVector out(n);
            CharacterVector names(n);
            for (size_t i=0; i<n; i++) {
                names[i] = data[i].first;
                out[i] = data[i].second - start_time ;
            }
            out.attr("names") = names;
            return out;
        }
@eddelbuettel

This comment has been minimized.

Copy link
Member

eddelbuettel commented Apr 25, 2018

Thanks for the fix.

And the suggestion is fair. But given that the file ships with Rcpp, removing a dependence on Rcpp itself is maybe not all that important. But contributions welcome.

@eddelbuettel eddelbuettel merged commit 1138767 into RcppCore:master Apr 25, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@romainfrancois

This comment has been minimized.

Copy link
Contributor Author

romainfrancois commented Apr 25, 2018

but then you have to #include <Rcpp.h> before you #include <Rcpp/Benchmark/Timer.h>

@eddelbuettel

This comment has been minimized.

Copy link
Member

eddelbuettel commented Apr 25, 2018

Fair point. We will see if it is important enough for someone to contribute a PR (and test case, preferably).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.