eris: add 'getnextid' and 'setnextid'
This commit is contained in:
@@ -456,6 +456,15 @@ LUA_API const void *lua_topointer (lua_State *L, int idx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
LUA_API lua_Integer lua_getnextid (lua_State *L) {
|
||||||
|
return L->nextid;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
LUA_API void lua_setnextid (lua_State *L, lua_Integer id) {
|
||||||
|
L->nextid = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** push functions (C -> stack)
|
** push functions (C -> stack)
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ struct lua_State {
|
|||||||
struct lua_longjmp *errorJmp; /* current error recover point */
|
struct lua_longjmp *errorJmp; /* current error recover point */
|
||||||
ptrdiff_t errfunc; /* current error handling function (stack index) */
|
ptrdiff_t errfunc; /* current error handling function (stack index) */
|
||||||
CallInfo base_ci; /* CallInfo for first level (C calling Lua) */
|
CallInfo base_ci; /* CallInfo for first level (C calling Lua) */
|
||||||
|
lua_Integer nextid; /* ID allocator for luprex */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -176,6 +176,8 @@ LUA_API void *(lua_touserdata) (lua_State *L, int idx);
|
|||||||
LUA_API lua_State *(lua_tothread) (lua_State *L, int idx);
|
LUA_API lua_State *(lua_tothread) (lua_State *L, int idx);
|
||||||
LUA_API const void *(lua_topointer) (lua_State *L, int idx);
|
LUA_API const void *(lua_topointer) (lua_State *L, int idx);
|
||||||
|
|
||||||
|
LUA_API lua_Integer (lua_getnextid) (lua_State *L);
|
||||||
|
LUA_API void (lua_setnextid) (lua_State *L, lua_Integer id);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Comparison and arithmetic functions
|
** Comparison and arithmetic functions
|
||||||
|
|||||||
Reference in New Issue
Block a user