aboutsummaryrefslogtreecommitdiff
path: root/py/binary.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-09-06 19:24:52 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-09-06 20:22:06 +0300
commit78fde4819c2e56365947dcfcc686d447c1d75f09 (patch)
tree19343c6eeb86cf43ebccb1c2289dbda66fc479d5 /py/binary.c
parent722e562736f83865333d8b3dd942f903b9db8a7c (diff)
modstruct: Implement 'O', 'P', 's' types for packed structs.
This is required to deal with, well, packed C structs containing pointers.
Diffstat (limited to 'py/binary.c')
-rw-r--r--py/binary.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/binary.c b/py/binary.c
index 783a48efd..919ba8784 100644
--- a/py/binary.c
+++ b/py/binary.c
@@ -58,6 +58,8 @@ int mp_binary_get_size(char struct_type, char val_type, mp_uint_t *palign) {
size = 4; break;
case 'q': case 'Q':
size = 8; break;
+ case 'P': case 'O': case 'S':
+ size = sizeof(void*); break;
}
break;
case '@': {