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

Make Result accessible via evmc_result reference #686

Merged
merged 1 commit into from
Apr 7, 2023

Conversation

yperbasis
Copy link
Member

@yperbasis yperbasis commented Mar 28, 2023

With .raw() method the evmc::Result can be passed to functions that just observe evmc_result and don't care about ownership. Something like:

void on_result(const evmc_result& res) {
  // use res somehow
}

void blah() {
  evmc::Result res{EVMC_SUCCESS, 1000, 0};
  on_result(res.raw()); // fine after this PR
}

@yperbasis yperbasis requested a review from chfast March 28, 2023 15:36
@codecov
Copy link

codecov bot commented Mar 28, 2023

Codecov Report

Merging #686 (eac92d2) into master (44fc118) will not change coverage.
The diff coverage is n/a.

❗ Current head eac92d2 differs from pull request most recent head f36d7f7. Consider uploading reports for the commit f36d7f7 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #686   +/-   ##
=======================================
  Coverage   93.15%   93.15%           
=======================================
  Files          25       25           
  Lines        3786     3786           
  Branches      394      394           
=======================================
  Hits         3527     3527           
  Misses        147      147           
  Partials      112      112           

@chfast chfast force-pushed the public_result branch 2 times, most recently from e5d7e7e to 2bce1f7 Compare April 7, 2023 08:28
Add Result::raw() method for accessing the result object
via reference to evmc_result.
@chfast chfast changed the title Make Result : evmc_result inheritance public Make Result accessible via evmc_result reference Apr 7, 2023
@chfast chfast merged commit 69ed5cd into ethereum:master Apr 7, 2023
@chfast chfast deleted the public_result branch April 7, 2023 08:53
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.

2 participants