[ python-Bugs-847845 ] struct.calcsize mismatch
SourceForge.net
noreply at sourceforge.net
Mon Nov 24 06:04:46 EST 2003
Bugs item #847845, was opened at 2003-11-23 21:46
Message generated for change (Comment added) made by mwh
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=847845&group_id=5470
Category: Extension Modules
Group: Python 2.3
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Marc Schraffenberger (schraf)
Assigned to: Nobody/Anonymous (nobody)
Summary: struct.calcsize mismatch
Initial Comment:
Python 2.3 (#2, Sep 2 2003, 14:46:01)
[GCC 3.1] on linux2
Python 2.3.2 (#1, Nov 21 2003, 10:31:27)
[GCC 3.2.2] on irix6
I was using the struct.calcsize function to get the
size of a byte and a long, although I was getting
mismatch errors when running the code. I found that
calcsize was giving different results when changing the
order of the format.
example:
struct.calcsize('BL') -> 8
struct.calcsize('LB') -> 5
----------------------------------------------------------------------
>Comment By: Michael Hudson (mwh)
Date: 2003-11-24 11:04
Message:
Logged In: YES
user_id=6656
One word: "padding". I suggest you read the struct module
documentation.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=847845&group_id=5470
More information about the Python-bugs-list
mailing list