| Conditions | 5 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | import struct |
||
| 4 | def format_32(): |
||
| 5 | # Get the size of C integers. We need 32 bits unsigned. |
||
| 6 | format_32 = ">I" |
||
| 7 | if struct.calcsize(format_32) < 4: |
||
| 8 | format_32 = ">L" |
||
| 9 | if struct.calcsize(format_32) != 4: |
||
| 10 | raise Exception("Cannot find a 32 bits integer") |
||
| 11 | elif struct.calcsize(format_32) > 4: |
||
| 12 | format_32 = ">H" |
||
| 13 | if struct.calcsize(format_32) != 4: |
||
| 14 | raise Exception("Cannot find a 32 bits integer") |
||
| 15 | else: |
||
| 16 | pass |
||
| 17 | return format_32 |
||
| 18 | |||
| 43 |