Fix userdata APIs for Lua 5.4 in native plugin interface (#1188)

* Reintroduce some missing Lua API's from native plugin API

* Add new upvalue functions to header

* Fix things that are actually macros in current lua

* Introduce lua_insert,replace,remove macros from lua5.4
This commit is contained in:
Quinten Kock
2022-12-27 23:39:28 -05:00
committed by GitHub
parent 141d00795c
commit 3fda8c0a09
2 changed files with 19 additions and 11 deletions
+7 -2
View File
@@ -946,9 +946,14 @@ static void* api_require(const char* symbol) {
P(iscfunction), P(yieldk),
U(checkversion_), U(tolstring), U(len), U(getsubtable), U(prepbuffsize),
U(pushresultsize), U(buffinitsize), U(checklstring), U(checkoption), U(gsub), U(loadbufferx),
U(loadfilex), U(optinteger), U(optlstring), U(requiref), U(traceback)
U(loadfilex), U(optinteger), U(optlstring), U(requiref), U(traceback),
#else
P(objlen)
P(objlen),
#endif
#if LUA_VERSION_NUM >= 504
P(newuserdatauv), P(setiuservalue), P(getiuservalue)
#else
P(newuserdata), P(setuservalue), P(getuservalue)
#endif
};