On Thu, Oct 27, 2016 at 11:40 AM, Ervin Hegedüs <airween@gmail.com> wrote:
or 2#
LUA_API int luaopen_example2(lua_State *L) {
static const struct luaL_Reg example2[] = {
{ "get_str", _wrap_get_str },
{ NULL, NULL }
};
luaL_newlib(L, example2); return 1;
}
this doesn't work - with or without assignment (example2 = require("example2") or simple require("example2")) I got:
this works, I just missed change the type of return value of function (luaopen_example2), and it stayed as "void", without return value.
Now I think everything's clear.
Regards:
a.