mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
feat(lua): global wipe, the table.wipe alias
On a stock 1.12.1 client, ScrollBoxListView, ScrollUtil, Menu and the DebugTools table inspector failed with "attempt to call global `wipe'": those ports call bare wipe(), and only Turtle's client defines that global. Stock 1.12.1 has only the table.wipe that ClassicAPI registers. 3.3.5 makes the alias in FrameScript's compat preamble, next to tinsert and tremove (wipe = tab.wipe). 1.12's preamble is older than table.wipe, so Wipe.cpp now registers the same C function as the global wipe as well as table.wipe, with a LuaGlobals descriptor. CallbackRegistry, MixinUtil and SecureTypes lose their "1.12 has no global wipe" notes and their table.wipe locals, and now match retail.
This commit is contained in:
@@ -32,9 +32,8 @@ namespace {
|
||||
// that are not base-library functions at all. So do not derive this from
|
||||
// the engine's `luaopen_base` table (`0x00811E28`, 36 entries — see
|
||||
// BlizzardScriptAPI.md §3); that is a different set with a different
|
||||
// purpose. Names with no 1.12 counterpart (`wipe` is `table.wipe` here; the
|
||||
// secure family does not exist) stay for parity of the error an addon
|
||||
// sees. Sorted alphabetically.
|
||||
// purpose. Names with no 1.12 counterpart (the secure family does not
|
||||
// exist) stay for parity of the error an addon sees. Sorted alphabetically.
|
||||
const char *const kUnhookableNames[] = {
|
||||
"getfenv", "getmetatable", "hooksecurefunc", "ipairs", "issecurevalue",
|
||||
"issecurevariable", "next", "pairs", "pcall", "pcallwithenv", "rawget",
|
||||
|
||||
Reference in New Issue
Block a user