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
Merged

undef FALSE in Timer #847

merged 1 commit into from
Apr 25, 2018

Conversation

romainfrancois
Copy link
Contributor

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

@romainfrancois
Copy link
Contributor Author

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
Copy link
Member

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
@romainfrancois
Copy link
Contributor Author

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

@eddelbuettel
Copy link
Member

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

interference between Timer and R_useDynamicSymbols
2 participants