lua-users home
lua-l archive

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


On Tue, Aug 7, 2012 at 3:59 PM, Matthias Kluwe <mkluwe@gmail.com> wrote:
>    printf( "typename   1: %s\n", lua_typename( L, 1 ) );
>    printf( "typename   2: %s\n", lua_typename( L, 2 ) );

The second argument of lua_typename() is *not* a stack index, but is
instead one of the symbolic constants returned by lua_type(). There is
a very similarly named function in the auxiliary library -
luaL_typename(), notice the L before the underscore - that *does* take
a stack index.

-Duncan