Skip to content

Commit

Permalink
fix storing of u8 and u16 types
Browse files Browse the repository at this point in the history
  • Loading branch information
cpetig committed Aug 5, 2024
1 parent 2b747f1 commit 0f2c647
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/cpp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2644,8 +2644,8 @@ impl<'a, 'b> Bindgen for FunctionBindgen<'a, 'b> {
abi::Instruction::F32Load { offset } => self.load("float", *offset, operands, results),
abi::Instruction::F64Load { offset } => self.load("double", *offset, operands, results),
abi::Instruction::I32Store { offset } => self.store("int32_t", *offset, operands),
abi::Instruction::I32Store8 { offset } => self.store("int32_t", *offset, operands),
abi::Instruction::I32Store16 { offset } => self.store("int32_t", *offset, operands),
abi::Instruction::I32Store8 { offset } => self.store("int8_t", *offset, operands),
abi::Instruction::I32Store16 { offset } => self.store("int16_t", *offset, operands),
abi::Instruction::I64Store { offset } => self.store("int64_t", *offset, operands),
abi::Instruction::F32Store { offset } => self.store("float", *offset, operands),
abi::Instruction::F64Store { offset } => self.store("double", *offset, operands),
Expand Down
9 changes: 9 additions & 0 deletions crates/cpp/tests/smoke_details/result8.wit
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package test:test;

interface a {
f: func() -> result<_, u8>;
}

world result8 {
export a;
}

0 comments on commit 0f2c647

Please sign in to comment.