Fix __len metamethod ignored on tables
Note: This is actually part of normal Lua 5.1. It was changed in Lua 5.2, making
newproxy()useless, but not actually removing it.
Oh I was not aware of
It's pretty obscure, I cannot blame you.
newproxyhas caused Lua panic errors the few times I've tried to use it in SRB2 so you might be better off not being aware of it :P
__lenfor tables is a good idea.
Just thought I'd point out how Lua 5.2 implements this behavior.
Speaking of Lua 5.2 implementation, pretty sure
__lenworks only on userdata and tables of 0-length there.