sbinet / go-python

naive go bindings to the CPython2 C-API
Other
1.53k stars 138 forks source link

Question: on the TODO item - "fix handling of integers" #70

Open binurs opened 6 years ago

binurs commented 6 years ago

Hello, I am planning to use the go-python package in one of my demo project. However I am a bit curious on this TODO item - "fix handling of integers (I did a poor job at making sure everything was ok)" Not sure how this is going to affect the project. Could you please give some more details on this TODO item? ie, Whats missing and what you would like to add? Would like to contribute into this, if I can :)

sbinet commented 6 years ago

Hi,

Apologies for the belated answer.

IIRC, what I meant with that to-do note was that I wasn't completely sure what I did for integers would work consistently between 32b and 64b platforms. I mapped both 'PyInt' and 'PyLong' to Go's 'int'. On a 64b machine, that should work. Probably not so much on a 32b one.

In hindsight, I should have probably matched them to int32 and int64... (Probably something to do when/if I migrate this project to the go-python organization)