[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Does lua internally parse all number into string?
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 16 Jul 2012 11:39:46 +0200
On Mon, Jul 16, 2012 at 11:34 AM, zaker <zgmfzaku@163.com> wrote:
> what i want to know is that when i write lua code like "GetValue( 0, table
> )" . what is the 0's type, number or string ?
> I got the result that 0's type is string.
I think you should show us GetValue()'s code.
One problem that does happen is that if you say lua_tostring(L,-1) it
actually _converts_ the value on the stack. So the right thing to do
is to check the type of the value before calling this.
steve d.