lua-users home
lua-l archive

Re: type mismatches...

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> From lua-l@tecgraf.puc-rio.br Wed Jul 14 18:38:42 1999
>
> >From lua-l@tecgraf.puc-rio.br Wed Jul 14 21:00:36 1999
> >From: Adam Wozniak <adam@mudlist.eorbit.net>
>
> >void lua_pushnumber (double n)
> >
> >should probably be
> >
> >void lua_pushnumber (real n)
>
> No. The idea is that Lua's API uses only primitive types (except for lua_Object,
> which is opaque).
>
Even if you define LUA_NUM_TYPE to be 'long'?
Leaving it as 'double' forces a number of unnecessary long->double->long
conversions. The whole point of using 'long' is to get away from floating
point operations on an embedded processor which has no floating point unit.
--Adam

AltStyle によって変換されたページ (->オリジナル) /