lua-users home
lua-l archive

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


On Sun, Apr 18, 2010 at 11:51 PM, Pan Shi Zhu <pan.shizhu@gmail.com> wrote:
> in C, the lua_tonumber() is an in-place convertion, it changes the
> value in stack and may cause unwanted behavior when you're iterating a
> table.

This is not true. lua_tonumber and its variants do not change the
value of the stack location. It converts the value to a number and
returns that number.

-- 
- Patrick Donnelly