c-api: Add wasm_*_same functions to global,memory,table

This commit is contained in:
Manos Pitsidianakis
2022-07-01 23:17:06 +03:00
parent 274aa3e167
commit 62f07efb08
7 changed files with 56 additions and 0 deletions

View File

@@ -239,6 +239,14 @@ impl Memory {
}
}
impl std::cmp::PartialEq for Memory {
fn eq(&self, other: &Self) -> bool {
self.handle == other.handle
}
}
impl std::cmp::Eq for Memory {}
impl<'a> Exportable<'a> for Memory {
fn get_self_from_extern(_extern: &'a Extern) -> Result<&'a Self, ExportError> {
match _extern {