diff options
Diffstat (limited to 'lobject.c')
-rw-r--r-- | lobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,10 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.c,v 2.27 2007/12/19 17:24:38 roberto Exp roberto $ | 2 | ** $Id: lobject.c,v 2.28 2008/01/30 18:05:23 roberto Exp roberto $ |
3 | ** Some generic functions over Lua objects | 3 | ** Some generic functions over Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <ctype.h> | ||
8 | #include <stdarg.h> | 7 | #include <stdarg.h> |
9 | #include <stdio.h> | 8 | #include <stdio.h> |
10 | #include <stdlib.h> | 9 | #include <stdlib.h> |
@@ -15,6 +14,7 @@ | |||
15 | 14 | ||
16 | #include "lua.h" | 15 | #include "lua.h" |
17 | 16 | ||
17 | #include "lctype.h" | ||
18 | #include "ldebug.h" | 18 | #include "ldebug.h" |
19 | #include "ldo.h" | 19 | #include "ldo.h" |
20 | #include "lmem.h" | 20 | #include "lmem.h" |
@@ -95,7 +95,7 @@ int luaO_str2d (const char *s, lua_Number *result) { | |||
95 | if (*endptr == 'x' || *endptr == 'X') /* maybe an hexadecimal constant? */ | 95 | if (*endptr == 'x' || *endptr == 'X') /* maybe an hexadecimal constant? */ |
96 | *result = cast_num(strtoul(s, &endptr, 16)); | 96 | *result = cast_num(strtoul(s, &endptr, 16)); |
97 | if (*endptr == '\0') return 1; /* most common case */ | 97 | if (*endptr == '\0') return 1; /* most common case */ |
98 | while (isspace(cast(unsigned char, *endptr))) endptr++; | 98 | while (lisspace(cast(unsigned char, *endptr))) endptr++; |
99 | if (*endptr != '\0') return 0; /* invalid trailing characters? */ | 99 | if (*endptr != '\0') return 0; /* invalid trailing characters? */ |
100 | return 1; | 100 | return 1; |
101 | } | 101 | } |