Re: Call to __len metamethod has userdata/table twice on stack
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Call to __len metamethod has userdata/table twice on stack
- From: tobias@...
- Date: 2017年2月16日 23:19:41 +0100
Quoting "Soni L." <fakedme@gmail.com>:
Also with unm and bnot:
"For the unary operators (negation, length, and bitwise NOT), the
metamethod is computed and called with a dummy second operand, equal
to the first one. This extra operand is only to simplify Lua's
internals (by making these operators behave like a binary operation)
and may be removed in future versions. (For most uses this extra
operand is irrelevant.)"
Thanks guys, should have dived deeper into the manual.
-Tobias