2017-01-22 02:00:32 +00:00
|
|
|
#include <lua.h>
|
|
|
|
#include <lauxlib.h>
|
|
|
|
#include <lualib.h>
|
2017-03-11 10:19:33 +00:00
|
|
|
#include "lib/map/map.h"
|
2017-10-21 20:10:07 +00:00
|
|
|
#include "util.h"
|
2017-01-22 02:00:32 +00:00
|
|
|
|
2017-01-26 10:20:30 +00:00
|
|
|
#pragma once
|
2017-01-22 02:00:32 +00:00
|
|
|
|
2018-07-25 04:15:07 +00:00
|
|
|
#define luax_totype(L, i, T) ((T*) _luax_totype(L, i, #T))
|
|
|
|
#define luax_checktype(L, i, T) ((T*) _luax_checktype(L, i, #T))
|
2017-01-22 02:00:32 +00:00
|
|
|
|
2018-09-27 03:14:16 +00:00
|
|
|
void luax_loadlib(lua_State* L, const char* library, const char* module);
|
2018-07-07 20:54:53 +00:00
|
|
|
void luax_registerloader(lua_State* L, lua_CFunction loader, int index);
|
2017-01-22 02:00:32 +00:00
|
|
|
void luax_registertype(lua_State* L, const char* name, const luaL_Reg* functions);
|
2017-05-16 21:37:05 +00:00
|
|
|
void luax_extendtype(lua_State* L, const char* base, const char* name, const luaL_Reg* baseFunctions, const luaL_Reg* functions);
|
2018-07-25 04:15:07 +00:00
|
|
|
void* _luax_totype(lua_State* L, int index, const char* type);
|
|
|
|
void* _luax_checktype(lua_State* L, int index, const char* type);
|
2018-07-25 03:10:30 +00:00
|
|
|
void luax_pushobject(lua_State* L, void* object);
|
2018-09-26 17:39:17 +00:00
|
|
|
void luax_vthrow(lua_State* L, const char* format, va_list args);
|
2018-02-17 17:18:08 +00:00
|
|
|
int luax_getstack(lua_State* L);
|
2017-11-23 04:08:46 +00:00
|
|
|
void luax_pushconf(lua_State* L);
|
2018-02-17 17:18:08 +00:00
|
|
|
int luax_setconf(lua_State* L);
|
2017-10-21 20:10:07 +00:00
|
|
|
Color luax_checkcolor(lua_State* L, int index);
|