_PyLong_FromByteArray

D

Dan Christensen

My student and I are writing a C extension that produces a large
integer in binary which we'd like to convert to a python long. The
number of bits can be a lot more than 32 or even 64. My student found
the function _PyLong_FromByteArray in longobject.h which is exactly
what we need, but the leading underscore makes me wary. Is it safe to
use this function? Will it continue to exist in future versions of
python? Or is there some other method we should use? We'd like
something fairly efficient...

Thanks,

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top