Skip to content

Commit b7f7802

Browse files
committed
Server sync
1 parent 29160bc commit b7f7802

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/lune-std-ffi/src/carr.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ use mlua::prelude::*;
99

1010
// See: https://stackoverflow.com/a/43525176
1111

12+
// Padding after each field inside the struct is set to next field can follow the alignment.
13+
// There is no problem even if you create a struct with n fields of a single type within the struct. Array adheres to the condition that there is no additional padding between each element. Padding to a struct is padding inside the struct. Simply think of the padding byte as a trailing unnamed field.
14+
1215
struct CArr {
1316
libffi_type: Type,
17+
struct_type: Type,
1418
length: usize,
1519
size: usize,
1620
}

0 commit comments

Comments
 (0)