Large integers from C

John Machin sjmachin at lexicon.net
Fri Feb 22 00:05:04 EST 2002


Tim Peters <tim.one at comcast.net> wrote in message news:<mailman.1014324517.14965.python-list at python.org>...
> [John Machin]
> > ...
> > So why not grab the source of _PyLong_FromByteArray() from the 2.2
> > distribution and put in your own code?
> 
> That's what I'd do.  Do note the leading underscore:  C functions in the
> core whose names begin with a leading underscore are deliberately
> undocumented in the manuals, and nothing about them (not even their
> existence) is guaranteed across releases.  They're internal implementation
> details, not part of the public C API.  Use of them is entirely at your own
> risk.

In this case as the OP in essence pointed out,
PyLong_FromSomeFormatLongerThanCLongLong()would be very useful for
punters who somehow are generating such beasties themselves.
_PyLong_FromByteArray() exposes no implementation details that are
private to longobject.c. Do you have any objection to removing the _
and getting the comments in the .h file copied into the C API manual?

Regards,
John



More information about the Python-list mailing list