mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-07 21:28:21 +00:00
chore(c-api) Move cbindgen:ignore from functions/types to modules.
This patch removes the amount of `cbindgen:ignore` instructions by moving this instruction onto the parent module.
This commit is contained in:
@@ -3,7 +3,6 @@ use super::types::{wasm_byte_vec_t, wasm_frame_t, wasm_frame_vec_t, wasm_message
|
||||
use wasmer::RuntimeError;
|
||||
|
||||
// opaque type which is a `RuntimeError`
|
||||
/// cbindgen:ignore
|
||||
#[allow(non_camel_case_types)]
|
||||
pub struct wasm_trap_t {
|
||||
pub(crate) inner: RuntimeError,
|
||||
@@ -15,7 +14,6 @@ impl From<RuntimeError> for wasm_trap_t {
|
||||
}
|
||||
}
|
||||
|
||||
/// cbindgen:ignore
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn wasm_trap_new(
|
||||
_store: &mut wasm_store_t,
|
||||
@@ -29,11 +27,9 @@ pub unsafe extern "C" fn wasm_trap_new(
|
||||
Some(Box::new(trap))
|
||||
}
|
||||
|
||||
/// cbindgen:ignore
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn wasm_trap_delete(_trap: Option<Box<wasm_trap_t>>) {}
|
||||
|
||||
/// cbindgen:ignore
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn wasm_trap_message(trap: &wasm_trap_t, out_ptr: &mut wasm_byte_vec_t) {
|
||||
let message = trap.inner.message();
|
||||
@@ -42,13 +38,11 @@ pub unsafe extern "C" fn wasm_trap_message(trap: &wasm_trap_t, out_ptr: &mut was
|
||||
out_ptr.data = byte_vec.data;
|
||||
}
|
||||
|
||||
/// cbindgen:ignore
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn wasm_trap_origin(trap: &wasm_trap_t) -> Option<Box<wasm_frame_t>> {
|
||||
trap.inner.trace().first().map(Into::into).map(Box::new)
|
||||
}
|
||||
|
||||
/// cbindgen:ignore
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn wasm_trap_trace(trap: &wasm_trap_t, out_ptr: &mut wasm_frame_vec_t) {
|
||||
let frames = trap.inner.trace();
|
||||
|
||||
Reference in New Issue
Block a user