lua-users home
lua-l archive

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


It seems reasonable. Roberto thank you a lot :-)

regards,
Xavier Wang

在 2012-9-11 上午1:46,"Roberto Ierusalimschy" <roberto@inf.puc-rio.br>写道:
> i'm studying lua's implement now, i'm wondering why lua's table need a
> dummy node, why not just set node to NULL if table's hash part is empty?
> could someone tell me the reason?

It avoids an extra test (t->node == NULL) when querying tables.

-- Roberto