Meador Inge <mead...@gmail.com> added the comment:

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: http://codereview.appspot.com/3863042/.  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.

----------
Added file: http://bugs.python.org/file20298/struct-string.py3k.3.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue3132>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to