lua-users home
lua-l archive

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


>Why does lua_typename take a state if the information is static?

Simplify because *all* API functions take a state (except lua_open).

>You could
>image situations where you want the type name strings without having a state
>opened, such as initializing the GUI of a graphical Lua debugger.  A
>"LUA_TMAX" might also be helpful, but starting the enum at -1 kind of gets
>in the way.

Unofficially, you call lua_typename with a NULL state.
--lhf