lgi-devs / lgi

Dynamic Lua binding to GObject libraries using GObject-Introspection
MIT License
440 stars 70 forks source link

Use Lua 5.3 integers #228

Closed v1993 closed 5 years ago

v1993 commented 5 years ago

Currently, every single number passed to/received from lgi is float even in Lua 5.3. However, a lot of numbers GLib work with (for example, file sizes) are integers.

I'm not into lgi code, but I think it shouldn't be too hard to use lua_pushinteger in Lua 5.3 for unsigned/integers and enums?

v1993 commented 5 years ago

I'm working on this right now. I'll send PR very soon.

Turned out to be quite easy overall.

v1993 commented 5 years ago

Current progress on this: https://github.com/v1993/lgi/tree/lua53-integer

v1993 commented 5 years ago

Implemented in #234, follow discussion there.

v1993 commented 5 years ago

Merged into master now, closing this issue…