Skip to content

Commit 78fde48

Browse files
committed
modstruct: Implement 'O', 'P', 's' types for packed structs.
This is required to deal with, well, packed C structs containing pointers.
1 parent 722e562 commit 78fde48

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

py/binary.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ int mp_binary_get_size(char struct_type, char val_type, mp_uint_t *palign) {
5858
size = 4; break;
5959
case 'q': case 'Q':
6060
size = 8; break;
61+
case 'P': case 'O': case 'S':
62+
size = sizeof(void*); break;
6163
}
6264
break;
6365
case '@': {

0 commit comments

Comments
 (0)