bigint <-> python long

Ellery Newcomer ellery-newcomer at utulsa.edu
Fri Sep 7 15:21:34 PDT 2012


On 09/06/2012 12:07 AM, Russel Winder wrote:
>
> I am guessing this is interfacing to CPython, remember there is also
> PyPy and ActiveState, they have different ways of doing things.  Well
> the ActiveState C API will be very close to the CPython C API, but PyPy
> (which is the best Python 2.7 just now) doesn't have a C API since it is
> written in RPython.

Yep, CPython for now. If activestate supports the CPython C API, then 
supporting it will probably just be a matter of linkage.

Googling, it looks like PyPy is/was trying to grow some CPython C API 
compatibility, so hopefully we can squeeze it in at some point.

>
> Oh yes.
>
> NumPy is basically a subsystem that Python applications make calls into.
> Although the data structure can be accessed and amended, algorithms on
> the data structures should never be written in Python, they should
> always be function calls into the NumPy framework.

I had a look at numpy, and at least ndarray supports the new style 
buffer interface (which is pretty freaking complicated), so convertion 
is totally doable. I'll fold in support as soon as I can get dmd to stop 
stabbing me in the face.


just used your scons fork to build the pyd embedded unittests. works 
pretty nice



More information about the Digitalmars-d-learn mailing list