Beispiel #1
0
int luaopen_pqtype_int2 (lua_State *L) {
  luaL_newlibtable(L, pqtype_int2_mt);
  lua_pushvalue(L, -1);
  registerlib(L, pqtype_int2_mt, 1);
  lua_pushcclosure(L, int2_call, 1);
  return 1;
}
Beispiel #2
0
static void openlibs(lua_State *L) {
  luaL_requiref(L, "_G", luaopen_base, 1);
  luaL_requiref(L, "package", luaopen_package, 1);
  lua_pop(L, 2);
  registerlib(L, "io", luaopen_io);
  registerlib(L, "os", luaopen_os);
  registerlib(L, "table", luaopen_table);
  registerlib(L, "string", luaopen_string);
  registerlib(L, "math", luaopen_math);
  registerlib(L, "debug", luaopen_debug);
}