[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: FW: lua_isnumber modifying variables
- From: RLake@...
- Date: Fri, 22 Nov 2002 10:02:37 -0500
> I can work around this by calling lua_type instead of lua_isnumber, but
> doesn't seem right that lua_isnumber should modify the variable it is
> testing - is this behaviour correct?
Yes, it is "correct" and it is documented.
The idea is that most functions which are looking for a number would like
to use the Lua coercion protocol, so lua_isnumber implements that. Calling
lua_type is the indicated solution.