rainwoodman / tinypy

tpy, a pet python forked from tinypy
Other
21 stars 5 forks source link

Probably type conversion #21

Closed mxlgv closed 3 years ago

mxlgv commented 3 years ago

I remember there was a bug in the old TinyPy. For the x86 platform, for unknown reasons, the arguments were not read correctly. For example, the function I my_func (0xffffffff) in TynyPy returned the value 0x7ffffff. Although if you collect for x64, then everything is fine: the values ​​are the same. 5 days looking for a problem in the source code - so I did not find it. Do you know anything about this?

rainwoodman commented 3 years ago

I think the old tinypy all numerical values (include integer types) was represented by a float. This may cause some issues casting between system int to and from a TP_NUM object.

The current version uses a double for TP_NUM. And we really should add support to a real, lossless integer type.

mxlgv commented 3 years ago

Thanks for the answer. Does this mean that you also have this bug?