Showing the changes to src (2 of 7 files). Show all
Unified · Split
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | /* |
| 2 | −** $Id: lobject.c,v 2.21 2006/01/10 12:50:00 roberto Exp $ | |
| 2 | +** $Id: lobject.c,v 2.22 2006/02/10 17:43:52 roberto Exp $ | |
| 3 | 3 | ** Some generic functions over Lua objects |
| 4 | 4 | ** See Copyright Notice in lua.h |
| 5 | 5 | */ |
| @@ -91,6 +91,8 @@ int luaO_str2d (const char *s, lua_Number *result) { · 85 unmodified lines | ||
| 91 | 91 | char *endptr; |
| 92 | 92 | *result = lua_str2number(s, &endptr); |
| 93 | 93 | if (endptr == s) return 0; /* conversion failed */ |
| 94 | + if (*endptr == 'x' || *endptr == 'X') /* maybe an hexadecimal constant? */ | |
| 95 | + *result = cast_num(strtoul(s, &endptr, 16)); | |
| 94 | 96 | if (*endptr == '\0') return 1; /* most common case */ |
| 95 | 97 | while (isspace(cast(unsigned char, *endptr))) endptr++; |
| 96 | 98 | if (*endptr != '\0') return 0; /* invalid trailing characters? */ |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | /* |
| 2 | −** $Id: luaconf.h,v 1.80 2006/01/27 13:54:39 roberto Exp $ | |
| 2 | +** $Id: luaconf.h,v 1.81 2006/02/10 17:44:06 roberto Exp $ | |
| 3 | 3 | ** Configuration file for Lua |
| 4 | 4 | ** See Copyright Notice in lua.h |
| 5 | 5 | */ |
| @@ -650,9 +650,9 @@ union luai_Cast { double l_d; long l_l; }; · 644 unmodified lines | ||
| 650 | 650 | |
| 651 | 651 | #else |
| 652 | 652 | |
| 653 | −#define lua_popen(L,c,m) \ | |
| 654 | − ((void)c, (void)m, luaL_error(L, LUA_QL("popen") " not supported"), (FILE*)0) | |
| 655 | −#define lua_pclose(L,file) ((void)L, (void)file, 0) | |
| 653 | +#define lua_popen(L,c,m) ((void)((void)c, m), \ | |
| 654 | + luaL_error(L, LUA_QL("popen") " not supported"), (FILE*)0) | |
| 655 | +#define lua_pclose(L,file) ((void)((void)L, file), 0) | |
| 656 | 656 | |
| 657 | 657 | #endif |
| 658 | 658 | |