Skip to content

Commit fe2bfdb

Browse files
authored
Move the endianness notes introduced with #4035 to wasmtime_val_raw. (#5303)
It seems they were mistakenly added to the `wasmtime_valunion` union whereas it is actually the `ValRaw` Rust type (represented by `wasmtime_val_raw`) that is affected by the change.
1 parent 54cfa4d commit fe2bfdb

File tree

1 file changed

+14
-14
lines changed
  • crates/c-api/include/wasmtime

1 file changed

+14
-14
lines changed

crates/c-api/include/wasmtime/val.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -119,38 +119,24 @@ typedef uint8_t wasmtime_v128[16];
119119
*/
120120
typedef union wasmtime_valunion {
121121
/// Field used if #wasmtime_val_t::kind is #WASMTIME_I32
122-
///
123-
/// Note that this field is always stored in a little-endian format.
124122
int32_t i32;
125123
/// Field used if #wasmtime_val_t::kind is #WASMTIME_I64
126-
///
127-
/// Note that this field is always stored in a little-endian format.
128124
int64_t i64;
129125
/// Field used if #wasmtime_val_t::kind is #WASMTIME_F32
130-
///
131-
/// Note that this field is always stored in a little-endian format.
132126
float32_t f32;
133127
/// Field used if #wasmtime_val_t::kind is #WASMTIME_F64
134-
///
135-
/// Note that this field is always stored in a little-endian format.
136128
float64_t f64;
137129
/// Field used if #wasmtime_val_t::kind is #WASMTIME_FUNCREF
138130
///
139131
/// If this value represents a `ref.null func` value then the `store_id` field
140132
/// is set to zero.
141-
///
142-
/// Note that this field is always stored in a little-endian format.
143133
wasmtime_func_t funcref;
144134
/// Field used if #wasmtime_val_t::kind is #WASMTIME_EXTERNREF
145135
///
146136
/// If this value represents a `ref.null extern` value then this pointer will
147137
/// be `NULL`.
148-
///
149-
/// Note that this field is always stored in a little-endian format.
150138
wasmtime_externref_t *externref;
151139
/// Field used if #wasmtime_val_t::kind is #WASMTIME_V128
152-
///
153-
/// Note that this field is always stored in a little-endian format.
154140
wasmtime_v128 v128;
155141
} wasmtime_valunion_t;
156142

@@ -169,25 +155,39 @@ typedef union wasmtime_valunion {
169155
*/
170156
typedef union wasmtime_val_raw {
171157
/// Field for when this val is a WebAssembly `i32` value.
158+
///
159+
/// Note that this field is always stored in a little-endian format.
172160
int32_t i32;
173161
/// Field for when this val is a WebAssembly `i64` value.
162+
///
163+
/// Note that this field is always stored in a little-endian format.
174164
int64_t i64;
175165
/// Field for when this val is a WebAssembly `f32` value.
166+
///
167+
/// Note that this field is always stored in a little-endian format.
176168
float32_t f32;
177169
/// Field for when this val is a WebAssembly `f64` value.
170+
///
171+
/// Note that this field is always stored in a little-endian format.
178172
float64_t f64;
179173
/// Field for when this val is a WebAssembly `v128` value.
174+
///
175+
/// Note that this field is always stored in a little-endian format.
180176
wasmtime_v128 v128;
181177
/// Field for when this val is a WebAssembly `funcref` value.
182178
///
183179
/// If this is set to 0 then it's a null funcref, otherwise this must be
184180
/// passed to `wasmtime_func_from_raw` to determine the `wasmtime_func_t`.
181+
///
182+
/// Note that this field is always stored in a little-endian format.
185183
size_t funcref;
186184
/// Field for when this val is a WebAssembly `externref` value.
187185
///
188186
/// If this is set to 0 then it's a null externref, otherwise this must be
189187
/// passed to `wasmtime_externref_from_raw` to determine the
190188
/// `wasmtime_externref_t`.
189+
///
190+
/// Note that this field is always stored in a little-endian format.
191191
size_t externref;
192192
} wasmtime_val_raw_t;
193193

0 commit comments

Comments
 (0)