#include #include #include "lsup_rdf.h" #ifndef _LUA_LSUP_H #define _LUA_LSUP_H /// Raise Lua error including LSUP error message on negative rc. #define LUA_PCHECK(exp, message) do {\ if (UNLIKELY ((exp) < LSUP_OK)) \ return luaL_error (L, "%s: %s", message, LSUP_strerror (exp)); \ } while (0) #define LUA_NLCHECK(exp, ...) do {\ if (UNLIKELY ((exp) == NULL)) return luaL_error (L, __VA_ARGS__); \ } while (0) /// Enum (int) constants to be passed to the module. typedef struct l_enum_const { const char *k; const int v; } LEnumConst; /// String constants to be passed to the module. typedef struct l_string_const { const char *k; const char *v; } LStringConst; void push_int_const (lua_State *L, const LEnumConst *list); void push_string_const (lua_State *L, const LStringConst *list); /// Create new namespace map. int l_nsmap_new (lua_State *L); /// Allocate space for a term object. LSUP_Term **allocate_term (lua_State *L); #endif // _LUA_LSUP_H