berry-lang / berry

A ultra-lightweight embedded scripting language optimized for microcontrollers.
https://berry-lang.github.io
MIT License
817 stars 97 forks source link

Converting COMPTR to int is not safe #189

Closed skiars closed 2 years ago

skiars commented 2 years ago

Refer to https://github.com/berry-lang/berry/pull/153.

@s-hadinger can you give some usage scenarios? Can we prohibit the conversion of COMPTR to int?

s-hadinger commented 2 years ago

I believe we can. This was my first attempt to convert everything to int. Then I realized that it was better to make comptr an first class type. I need to test if it brakes some of my code though.

Can you please hold on for now?

s-hadinger commented 2 years ago

It is fine now, I fixed the Tasmota code to not rely on this. I will submit a PR.