[issue12528] Implement configurable bitfield allocation strategy

2017-07-22 Thread Charles Machalow
Charles Machalow added the comment: Was browsing and found this. This option would be very useful as it could help avoid a current bug I've had to deal with : https://bugs.python.org/issue29753. My use case works with data/structs from another device all-together, so I can't control it's packi

[issue12528] Implement configurable bitfield allocation strategy

2011-09-01 Thread Meador Inge
Meador Inge added the comment: Hi Vlad, On Thu, Sep 1, 2011 at 1:30 PM, Vlad Riscutia wrote: > Vlad Riscutia added the comment: > > Well currently we pack bitfields with an algorithm that uses #ifdefs for GCC > and MSVC builds. This feature tries to remove the > hardcoded behavior and imple

[issue12528] Implement configurable bitfield allocation strategy

2011-09-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: As a (Windows) user, I would like to be able to download any working pre-compiled shared library (.dll) and access it via ctypes. The particular compiler used to compile cpythonx.y.z should not determine whether a Pythonx.y program works. The use of VSC2008 i

[issue12528] Implement configurable bitfield allocation strategy

2011-09-01 Thread Vlad Riscutia
Vlad Riscutia added the comment: Well currently we pack bitfields with an algorithm that uses #ifdefs for GCC and MSVC builds. This feature tries to remove the hardcoded behavior and implement it as a runtime option. This should improve interop with other compilers. Currently I provided these

[issue12528] Implement configurable bitfield allocation strategy

2011-09-01 Thread Meador Inge
Meador Inge added the comment: As stated, how a particular compiler allocates bitfields is *extremely* implementation specific. There can be differences in implementations between different compilers, different *versions* of the same compiler, and different invocations of the same compiler w

[issue12528] Implement configurable bitfield allocation strategy

2011-07-23 Thread Vlad Riscutia
Vlad Riscutia added the comment: Updated patch to reflect review feedback. Allocation strategy is now specified as string in Python code. I kept asserts in CanContinueField/CanExpandField because, as I said, default case should never be hit. Input is validated in stgdict and this should make

[issue12528] Implement configurable bitfield allocation strategy

2011-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: My review of the patch: http://bugs.python.org/review/12528/show -- nosy: +amaury.forgeotdarc stage: -> patch review ___ Python tracker

[issue12528] Implement configurable bitfield allocation strategy

2011-07-10 Thread Vlad Riscutia
Changes by Vlad Riscutia : Removed file: http://bugs.python.org/file22617/cfield_bitfield_refactoring.diff ___ Python tracker ___ ___ Python-b

[issue12528] Implement configurable bitfield allocation strategy

2011-07-10 Thread Vlad Riscutia
Vlad Riscutia added the comment: Removed previously attached partial patch, this is complete patch. Summary: Added following 3 constants in ctypes: ctypes.BITFIELD_ALLOCATION_NATIVE ctypes.BITFIELD_ALLOCATION_GCC ctypes.BITFIELD_ALLOCATION_MSVC Setting _bitfield_allocation_ attribute to one of

[issue12528] Implement configurable bitfield allocation strategy

2011-07-10 Thread Santoso Wijaya
Changes by Santoso Wijaya : -- nosy: +santa4nt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue12528] Implement configurable bitfield allocation strategy

2011-07-10 Thread Vlad Riscutia
New submission from Vlad Riscutia : Opened this issue to track configurable bitfield allocation strategy. This will address issues like http://bugs.python.org/issue6069, http://bugs.python.org/issue11920. Summary: the way bitfields are allocated is up to the compiler not defined by standard.