[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Make sure numbers are numbers
- From: Patrick Donnelly <batrick@...>
- Date: Mon, 19 Apr 2010 00:09:17 -0400
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