This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author meador.inge
Recipients Alexander.Belopolsky, MrJean1, ajaksu2, barry, benjamin.peterson, inducer, mark.dickinson, meador.inge, noufal, pitrou, pv, teoliphant
Date 2011-01-07.03:59:08
SpamBayes Score 4.01851e-10
Marked as misclassified No
Message-id <>
Attached is the latest version of the struct string patch.  I tested on OS X 10.6.5 (64-bit) and Ubuntu 10.04 (32-bit).  I also scanned for memory problems with Valgrind.  There is one test failing on 32-bit systems ('test_crasher').  This is due to the fact that 'struct.pack("357913941b", ...)' no longer tries to allocate 357913941 format codes.  This implementation just allocates *one* code and assigns a count of 357913941, which is utilized later when packing/unpacking.  Some work could be done to add better large memory consumption checks, though.

Previous feedback has been incorporated:

   1. Multiplicities allowed on struct specifiers.
   2. Maximum alignment rule.
   3. Struct nesting depth limited (64 levels).
   4. The old behavior of only one byte order specified.  However, 
      the code is written in a way such that the scoped behavior
      would be easy to add.

As before, there will surely be more iterations, but this is good enough for general review to see if things are headed in the right direction.  

This is a difficult one for review because the diffs are really large.  I placed a review on Rietveld here:  If anyone has any ideas on how to reduce the number number of diffs (perhaps a way to do multiple smaller pataches), then that would be cool.  I don't see an obvious way to do this at this point.
Date User Action Args
2011-01-07 03:59:14meador.ingesetrecipients: + meador.inge, barry, teoliphant, mark.dickinson, pitrou, inducer, ajaksu2, MrJean1, benjamin.peterson, pv, noufal, Alexander.Belopolsky
2011-01-07 03:59:13meador.ingesetmessageid: <>
2011-01-07 03:59:10meador.ingelinkissue3132 messages
2011-01-07 03:59:10meador.ingecreate