lua-users home
lua-l archive

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


Title: RE: Registering a C function into a Lua table

>     lua_pushstring(L, module);
>     lua_pushstring(L, name);
>     lua_pushcfunction(L, method);
>     lua_settable(L, 1);        // << crashes here

(at least in old versions) lua_settable expects a table as first
argument, rather than a string.

--
Vincent Penquerc'h