Maybe the some internal function change the 0's type. I got your advise. Thanks.
Here are the code:
GetValue's C code:
static int GetValue_Factory(lua_State *L)
lua_pushcclosure(L, GetValue, 2);
static int GetValue(lua_State *L)
At 2012-07-16 17:39:46,"steve donovan" <email@example.com> wrote:
>On Mon, Jul 16, 2012 at 11:34 AM, zaker <firstname.lastname@example.org> 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.