lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> This can easily be done by configuring Lua with the C API (supposing that you have access to the C code integrating Lua in your environment).
> The idea here is to add a metatable to the nil value, so that `nil[anIndex]` returns nil.

You can use debug.setmetatable(nil, ...) in Lua if you have access to debug.