mirror of
https://github.com/ENSL/NS.git
synced 2024-12-18 08:41:37 +00:00
d995257c31
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@282 67975925-1194-0748-b3d5-c16f83f1a3a1
29 lines
No EOL
698 B
C
29 lines
No EOL
698 B
C
#ifndef AVHLUAUTIL_H
|
|
#define AVHLUAUTIL_H
|
|
|
|
extern "C" {
|
|
#include <lua.h>
|
|
#include <lualib.h>
|
|
#include <lauxlib.h>
|
|
}
|
|
|
|
#define newtable(L) (lua_newtable(L), lua_gettop(L))
|
|
|
|
/*
|
|
void UTIL_LUATablePair(char *key, const char *value);
|
|
void UTIL_LUATablePair(char *key, lua_Number value);
|
|
void UTIL_LUATablePair(char *key, bool value);
|
|
void UTIL_LUATablePair(char *key, lua_CFunction function);
|
|
*/
|
|
|
|
void UTIL_LUARegisterObject(lua_State *L, const luaL_reg *mainmethods, const luaL_reg *metamethods, char *objName);
|
|
|
|
void AvHLUA_OnError(const char *errorMsg);
|
|
#define AvHLUA_Pcall(L, a, b) \
|
|
if (lua_pcall(L, a, b, 0)) \
|
|
{ \
|
|
AvHLUA_OnError(lua_tostring(L, -1)); \
|
|
}
|
|
|
|
|
|
#endif |