[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Function call with number parameter becomes a string parameter inside the function
- From: Mark Hamburg <mhamburg@...>
- Date: Thu, 29 Jun 2006 11:58:13 -0700
on 6/29/06 3:46 AM, David Jones at drj@pobox.com wrote:
> I'm sure lots of people have been bitten by this behaviour (I know I
> have). Maybe it would be better if lua_tostring took an additional
> argument which was the stack slot to overwrite with the Lua string.
> Then it would be more clear that lua_tostring was doing something a
> bit different, and if you didn't want to change your number into a
> string you could do that by specifying a different stack slot. There
> are other variations that come to mind too.
I would prefer a version of lua_tostring (and lua_tonumber) that didn't do
the conversion at all. It's magic that I don't need.
Mark