Re: Pass int64
James Porter <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
Niki Bowe wrote: > Done correctly that is the best solution. Itll allow you to do > arithmetic on 64 bit integers in lua. > Though there is a bit more to it than that. > lua_Number will need to be able to hold int64 values without loss. > which means youll need to either go with int64 as lua_Number (ie integer > only lua) > or long double as lua_Number (non portable. no guarantee it can > represent all 64 bit ints. Are you sure about this? Because that would imply that Lua 5.1 doesn't work properly when compiled for a 64-bit platform since, by default, LUA_INTEGER is #defined to ptrdiff_t. That seems like something the Lua developers would have considered, but maybe not... - Jim ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com