123456789101112131415161718192021222324252627282930313233 |
- #include <lua.h>
- //#include <lualib.h>
- #include <lauxlib.h>
- #include <lsup_rdf.h>
- lua_State *L;
- static int l_init (lua_State *L)
- {
- LSUP_rc rc;
- if ((rc = LSUP_init ()) != LSUP_OK) {
- lua_pushnil (L);
- lua_pushstring (L, LSUP_strerror (rc));
- return 2;
- }
- return 0;
- }
- static const struct luaL_Reg lsup_lib [] = {
- {"init", l_init},
- {NULL, NULL}
- };
- int luaopen_lsup (lua_State *L)
- {
- luaL_newlib (L, lsup_lib);
- return 1;
- }
|