[issue1283] PyBytes (buffer) .extend method needs to accept any iterable of ints

Alexandre Vassalotti report at bugs.python.org
Sun Dec 2 01:41:53 CET 2007


Alexandre Vassalotti added the comment:

Made 2 minor enhancements to the patch:
   + Added the proper type-cast to PyMem_Realloc call.
   + Changed (len >> 1) to (len >> 1) + 1, just to be sure that the
buffer  doesn't overflow if __length_hint__ return 0 or 1 erroneously.

Added file: http://bugs.python.org/file8848/byte_extend-2.patch

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1283>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: byte_extend-2.patch
Type: text/x-patch
Size: 3520 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-bugs-list/attachments/20071202/672d3712/attachment.bin 


More information about the Python-bugs-list mailing list