You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In PR #31 , along with various other changes, it appears that thoughout the code, the interpretation of Object ID values in SWI calls was changed from signed to unsigned (most notably, in base.py, when the object is created and the ID fetched from the Toolbox).
I noticed while testing the new version with my existing app code that I was repeatedly getting "Python int too large to convert to C long" errors; this appears to be because my code contains various calls to Toolbox SWIs directly for functionality that isn't in the library, and these calls are passing the IDs as signed values, as was expected in 1.0.x. However, now there is a mismatch so all code of this sort is broken.
FWIW, the c headers for the Toolbox veneers specify ObjectId and ComponentId was typedefs for int, but the important thing here is consistency, really. So I propose that if this isn't swapped back entirely, perhaps at least there could be an option to set to have riscos-toolbox cast these back to signed for me to avoid having to change a lot of code points.
This is a bit of a tricky one, they probably should be unsigned, but as they weren't before and as such I'm tempted to put them back to signed for now and try to address the underlying issues later. This may well result in a breaking change, but I'd like to get a better handle on that before I do so.
In PR #31 , along with various other changes, it appears that thoughout the code, the interpretation of Object ID values in SWI calls was changed from signed to unsigned (most notably, in base.py, when the object is created and the ID fetched from the Toolbox).
I noticed while testing the new version with my existing app code that I was repeatedly getting "Python int too large to convert to C long" errors; this appears to be because my code contains various calls to Toolbox SWIs directly for functionality that isn't in the library, and these calls are passing the IDs as signed values, as was expected in 1.0.x. However, now there is a mismatch so all code of this sort is broken.
FWIW, the c headers for the Toolbox veneers specify ObjectId and ComponentId was typedefs for int, but the important thing here is consistency, really. So I propose that if this isn't swapped back entirely, perhaps at least there could be an option to set to have riscos-toolbox cast these back to signed for me to avoid having to change a lot of code points.
If needed, this can be reliably reproduced by loading the test file for my application, RLook:
https://github.com/laurenrad/RLook
Or, this is likely to occur variously in TBPTest:
https://github.com/laurenrad/TBPTest
The text was updated successfully, but these errors were encountered: