mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-06-13 15:01:41 +00:00
also module extensions
This commit is contained in:
@ -457,6 +457,7 @@ impl Serialize for ExportSection {
|
||||
}
|
||||
|
||||
/// Section with function bodies of the module.
|
||||
#[derive(Default)]
|
||||
pub struct CodeSection(Vec<FuncBody>);
|
||||
|
||||
impl CodeSection {
|
||||
@ -465,10 +466,15 @@ impl CodeSection {
|
||||
CodeSection(bodies)
|
||||
}
|
||||
|
||||
/// All function bodies in the section
|
||||
/// All function bodies in the section.
|
||||
pub fn bodies(&self) -> &[FuncBody] {
|
||||
&self.0
|
||||
}
|
||||
|
||||
/// All function bodies in the section, mutable.
|
||||
pub fn bodies_mut(&mut self) -> &mut Vec<FuncBody> {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl Deserialize for CodeSection {
|
||||
|
Reference in New Issue
Block a user