Skip to content

Commit

Permalink
rust: turn evmc_host_context instantiable
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Jun 24, 2020
1 parent 4b78b32 commit b0c40df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bindings/rust/evmc-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn gen_bindings() {
.derive_hash(true)
// force deriving the PratialEq trait on basic types (address, bytes32)
.derive_partialeq(true)
.opaque_type("evmc_host_context")
.blacklist_type("evmc_host_context")
.whitelist_type("evmc_.*")
.whitelist_function("evmc_.*")
.whitelist_var("EVMC_ABI_VERSION")
Expand Down
6 changes: 6 additions & 0 deletions bindings/rust/evmc-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@

include!(concat!(env!("OUT_DIR"), "/bindings.rs"));

// Defining evmc_host_context here, because bindgen cannot create a useful declaration yet.

pub type evmc_host_context = ::std::os::raw::c_void;

//pub struct evmc_host_context { }

// TODO: add `.derive_default(true)` to bindgen instead?

impl Default for evmc_address {
Expand Down

0 comments on commit b0c40df

Please sign in to comment.