lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 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