PetterS / quickjs

Thin Python wrapper of https://bellard.org/quickjs/
https://github.com/bellard/QuickJS
MIT License
177 stars 19 forks source link

Fix conversion of large Python integers to quickjs #71

Closed qwenger closed 2 years ago

qwenger commented 2 years ago

Implement the conversion of Python integers to quickjs when they are too large to fit in a C long.

By symmetry to the reverse operation, converts the value to a float (possibly losing precision in the process), which can then be transferred transparently to JS.