This repository was archived by the owner on Nov 17, 2025. It is now read-only.
rust: turn evmc_host_context into a void type#524
Merged
Conversation
axic
commented
Jun 24, 2020
bindings/rust/evmc-sys/src/lib.rs
Outdated
|
|
||
| pub type evmc_host_context = ::std::os::raw::c_void; | ||
|
|
||
| //pub struct evmc_host_context { } |
Member
Author
There was a problem hiding this comment.
Could also just implement Default on this.
axic
commented
Jun 24, 2020
|
|
||
| // Defining evmc_host_context here, because bindgen cannot create a useful declaration yet. | ||
|
|
||
| pub type evmc_host_context = ::std::os::raw::c_void; |
Member
Author
There was a problem hiding this comment.
Perhaps this is the best option, given this is a completely opaque type, unless there is something like raw::intptr.
Member
Author
|
@CaptainVincent do you want to make a PR so we can discuss it? |
Done. #527. (Include evmc-client and workaround) |
Member
Author
|
@vorot93 this is an old outstanding change, but do you have any suggestion? What bindgen generates is the following: #[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq)]
pub struct evmc_host_context {
_unused: [u8; 0],
}We want something what can be "instantiated". |
Codecov Report
@@ Coverage Diff @@
## master #524 +/- ##
=======================================
Coverage 92.86% 92.86%
=======================================
Files 23 23
Lines 3546 3546
Branches 375 375
=======================================
Hits 3293 3293
Misses 144 144
Partials 109 109 |
chfast
approved these changes
May 22, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This may be needed for #476.