Skip to content

Instantly share code, notes, and snippets.

View starwing's full-sized avatar

Xavier Wang starwing

  • Chengdu
View GitHub Profile
@starwing
starwing / funcidx.lua
Created June 14, 2020 08:14 — forked from Oberon00/funcidx.lua
Lua C API function HTML reference table data & generator (http://oberon00.github.io/lua-cfuncidx/index.html)
-- Helpers {{{1
local function fail_on_missing_tbl(t, missing_name)
missing_name = missing_name or 'table entry'
return setmetatable(t, {__index = function(t, k)
error(('No %s with key "%s" (in %s).'):format(missing_name, k, t))
end
})
end
fail_on_missing_tbl(_G, 'global');