Re: Python 2.7: _PyLong_NumBits() Segfault

2015-08-15 Thread Ned Batchelder
On Saturday, August 15, 2015 at 2:36:44 AM UTC-4, Adam Meily wrote: > I am working on a CPython library that serializes Python objects to disk in a > custom format. I'm using _PyLong_NumBits() to determine whether > PyLong_AsLong(), PyLong_AsUnsignedLong(), PyLong_AsLongLong(), or > PyLong_AsUns

Python 2.7: _PyLong_NumBits() Segfault

2015-08-14 Thread Adam Meily
I am working on a CPython library that serializes Python objects to disk in a custom format. I'm using _PyLong_NumBits() to determine whether PyLong_AsLong(), PyLong_AsUnsignedLong(), PyLong_AsLongLong(), or PyLong_AsUnsignedLongLong() should be used. In Python 3.x, I'm able to determine how many