[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: parse hex numerals [PATCH]
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 09 Feb 2006 10:18:04 -0200
> for an explanation and a (IMHO) better/simpler patch which makes
> hex numbers work with non-C99 libraries, too (MSVC for Windows).
Do we really need a patch? Can't we just use configuration? Something
like this (untested...):
#define lua_str2number(s,p) \
(s[0]=='0' && s[1] == 'x') ? strtoul(s[2], p, 16) : strtod((s), (p))
-- Roberto