Statically compile that callback too
This commit is contained in:
parent
9f7895a457
commit
e1a8006af7
1
build.rs
1
build.rs
|
@ -24,6 +24,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||
.define("VB_SIGNED_PROPAGATE", None)
|
||||
.define("VB_DIV_GENERIC", None)
|
||||
.define("VB_DIRECT_EXECUTE", "on_execute")
|
||||
.define("VB_DIRECT_FRAME", "on_frame")
|
||||
.define("VB_DIRECT_READ", "on_read")
|
||||
.define("VB_DIRECT_WRITE", "on_write")
|
||||
.file(Path::new("shrooms-vb-core/core/vb.c"))
|
||||
|
|
|
@ -170,6 +170,7 @@ extern "C" {
|
|||
fn vb_write(sim: *mut VB, address: u32, _type: VBDataType, value: i32) -> i32;
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
extern "C" fn on_frame(sim: *mut VB) -> c_int {
|
||||
// SAFETY: the *mut VB owns its userdata.
|
||||
// There is no way for the userdata to be null or otherwise invalid.
|
||||
|
|
Loading…
Reference in New Issue