Better documentation of the object-oriented-lua patch, and removal of an unused patch from lua

This commit is contained in:
2026-03-11 04:00:16 -04:00
parent 9fa6bd4bb6
commit d5fb9cd224
6 changed files with 407 additions and 88 deletions

View File

@@ -679,25 +679,6 @@ bool SourceDB::function_docs(const LuaCoreStack &LS, LuaSlot fn, std::ostream &o
}
}
// These should go away eventually. They're for debugging.
LuaDefine(coroutine_setnextid, "thread,id", "set the next id of a thread (debugging only)") {
LuaArg co, lid;
LuaDefStack LS(L, co, lid);
lua_State *CO = LS.ckthread(co);
lua_Number id = LS.ckinteger(lid);
lua_setnextid(CO, id);
return LS.result();
}
LuaDefine(coroutine_getnextid, "thread", "get the next id of a thread (debugging only)") {
LuaArg co;
LuaRet lid;
LuaDefStack LS(L, co, lid);
lua_State *CO = LS.ckthread(co);
LS.set(lid, lua_getnextid(CO));
return LS.result();
}
LuaDefine(unittests_sourcedb, "", "some unit tests") {
LuaSnap msnap;
LuaSnap ssnap;

View File

@@ -514,16 +514,6 @@ 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)
*/

View File

@@ -173,7 +173,6 @@ struct lua_State {
struct lua_longjmp *errorJmp; /* current error recover point */
ptrdiff_t errfunc; /* current error handling function (stack index) */
CallInfo base_ci; /* CallInfo for first level (C calling Lua) */
lua_Integer nextid; /* ID allocator for luprex */
};

View File

@@ -178,9 +178,6 @@ LUA_API void *(lua_touserdata) (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 lua_Integer (lua_getnextid) (lua_State *L);
LUA_API void (lua_setnextid) (lua_State *L, lua_Integer id);
/*
** Comparison and arithmetic functions
*/