From 3f5493cad4f87054f725bf89b047a96be6943eb6 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Thu, 29 Feb 2024 01:44:03 -0800 Subject: [PATCH] Expose some Module APIs that measure various lengths --- crates/wasmi/src/module/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/wasmi/src/module/mod.rs b/crates/wasmi/src/module/mod.rs index a2b145a8092..356e6c08aa0 100644 --- a/crates/wasmi/src/module/mod.rs +++ b/crates/wasmi/src/module/mod.rs @@ -180,19 +180,19 @@ impl Module { } /// Returns the number of non-imported functions of the [`Module`]. - pub(crate) fn len_funcs(&self) -> usize { + pub fn len_funcs(&self) -> usize { self.funcs.len() } /// Returns the number of non-imported tables of the [`Module`]. - pub(crate) fn len_tables(&self) -> usize { + pub fn len_tables(&self) -> usize { self.tables.len() } /// Returns the number of non-imported linear memories of the [`Module`]. - pub(crate) fn len_memories(&self) -> usize { + pub fn len_memories(&self) -> usize { self.memories.len() } /// Returns the number of non-imported global variables of the [`Module`]. - pub(crate) fn len_globals(&self) -> usize { + pub fn len_globals(&self) -> usize { self.globals.len() }