Changing the number type to int64_t is certainly a good idea. Two questions, however:
1) Why do you remove the sys/modules/lua/inttypes.g file? 2) In sys/modules/lua/luaconf.h, lua_str2number is still #defined as stroll(), which assumes long long. Shouldn't that be changed as well to a function taking int64_t as argument?