jeremyong/Selene

Add 64-bit integers in primitives.h

BorisCarvajal opened this issue · 2 comments

Since Lua 5.3, it should be support for 64-bit integers now that lua_Integer uses long long.

the usages of int should probably just be replaced with lua_integer everywhere to be truly portable.

Existing code like int x = selector["myVar"] would pick up sel::Selector::operator T& instead of sel::Selector::operator lua_integer if lua_interger != int.

A more stable option seems to be to actually provide sel::Selector::operator X for all integral types. (Same for floatingpoint). Not sure whether that has other undesireable effects apart from the potential narrowing behind the scenes.