|
Teste
#include "lauxlib.h"
#include
static int my_foo(lua_State* L) {
lua_pushstring(L, "FOO");
return 1;
}
static const struct luaL_reg clua001_lib[] = {
{"foo", my_foo},
{NULL, NULL}
};
LUALIB_API int luaopen_clua001(lua_State *L) {
lua_pushvalue(L, LUA_GLOBALSINDEX);
luaL_openlib(L, NULL, clua001_lib, 0);
return 0;
}
|
Veja se este link vai pra pagina 165 do PDF...
ab cd
|