[New-bugs-announce] [issue17617] struct.calcsize() incorrect
bonnet
report at bugs.python.org
Tue Apr 2 14:40:51 CEST 2013
New submission from bonnet:
struct.calcsize('iiiii?') : 21
appears to be incorrect ; in C sizeof : 24
C code:
typedef struct {
int param1;
int param2;
int param3;
int param4;
int param5;
unsigned char param6;
} struct_titi6;
main:
struct_titi6 toto3;
printf("taille toto3 : %d\n",sizeof(toto3));
printf("taille toto3.param1 : %d\n",sizeof(toto3.param1));
printf("taille toto3.param6 : %d\n",sizeof(toto3.param6));
results:
taille toto3 : 24
taille toto3.param1 : 4
taille toto3.param6 : 1
----------
components: Library (Lib)
messages: 185834
nosy: boa124
priority: normal
severity: normal
status: open
title: struct.calcsize() incorrect
type: behavior
versions: Python 2.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17617>
_______________________________________
More information about the New-bugs-announce
mailing list