| 1 |
/* |
| 2 |
** lauxlib_bridge.h, |
| 3 |
** Auxiliary functions bridge from luatex lua5.2 luajit 2.0 |
| 4 |
** See Copyright Notice in lua.h |
| 5 |
*/ |
| 6 |
|
| 7 |
|
| 8 |
#ifndef lauxlib_bridge_h |
| 9 |
#define lauxlib_bridge_h |
| 10 |
|
| 11 |
#include "lauxlib.h" |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
/* compatibility with luatex lua5.2 */ |
| 16 |
/* |
| 17 |
#define LUA_OK 0 |
| 18 |
#define LUA_OPEQ 0 |
| 19 |
#define LUA_OPLT 1 |
| 20 |
#define LUA_OPLE 2 |
| 21 |
*/ |
| 22 |
|
| 23 |
/* http://lua.2524044.n2.nabble.com/converting-modules-in-written-in-C-for-Lua-5-1-to-Lua-5-2-td7642941.html */ |
| 24 |
#define luaL_setmetatable(L, tname) luaL_getmetatable(L, tname);lua_setmetatable(L, -2); |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
LUALIB_API void *(luaL_testudata) (lua_State *L, int ud, const char *tname); |
| 29 |
LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup); |
| 30 |
LUALIB_API char *luaL_prepbuffsize (luaL_Buffer *B, size_t sz) ; |
| 31 |
LUA_API int lua_compare (lua_State *L, int index1, int index2, int op); |
| 32 |
|
| 33 |
#if !defined(lua_lock) |
| 34 |
#define lua_lock(L) ((void) 0) |
| 35 |
#define lua_unlock(L) ((void) 0) |
| 36 |
#endif |
| 37 |
|
| 38 |
#define luaL_newlibtable(L,l) lua_createtable(L, 0, sizeof(l)/sizeof((l)[0]) - 1) |
| 39 |
|
| 40 |
#endif |