Vlad Riscutia <riscutiav...@gmail.com> added the comment:

Attached doc update against tip (though I still hope my patch for configurable 
allocation strategies will make it in). 

This is my first doc patch so let me know if I missed something. I am basically 
explaining that bit field allocation is compiler-specific and no assumptions 
should be made of how a bitfield is allocated. 

I believe this is the better thing to do rather than detailing how GCC and MSVC 
allocated their bitfields because that would just encourage people to use this 
feature incorrectly. Most bugs opened on bit fields are because people are 
toying with the underlying buffer and get other results than what they expect. 
IMO, when using bitfields one should only access the structure members at a 
high level and not go read/write the raw memory underneath.

----------
keywords: +patch
Added file: http://bugs.python.org/file23275/bitfield_doc.diff

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

Reply via email to