lua-users home
lua-l archive

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


Hi,

I have the code:

printf("errno: %d\n", errno);
lua_getglobal(L, "require");
lua_pushliteral(L, "mymodule");
lua_call(L, 1, 1);
printf("errno: %d\n", errno);

package.cpath:
/mydir/?/?.so

mymodule exists:
/mydir/mymodule/mymodule.so

It is being required successfully.

The wrong thing here for me is that errno is set to 2 (No such file or directory) after the successful require.
It gives me some trouble later.
Is such behavior expected here?
Or I'm doing something wrong?

Regards,
Iurii.