diff options
Diffstat (limited to 'lobject.c')
| -rw-r--r-- | lobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lobject.c,v 1.55 2000/10/20 16:36:32 roberto Exp roberto $ | 2 | ** $Id: lobject.c,v 1.56 2000/11/24 17:39:56 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 | */ |
| @@ -65,9 +65,9 @@ char *luaO_openspace (lua_State *L, size_t n) { | |||
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | 67 | ||
| 68 | int luaO_str2d (const char *s, Number *result) { /* LUA_NUMBER */ | 68 | int luaO_str2d (const char *s, lua_Number *result) { /* LUA_NUMBER */ |
| 69 | char *endptr; | 69 | char *endptr; |
| 70 | Number res = lua_str2number(s, &endptr); | 70 | lua_Number res = lua_str2number(s, &endptr); |
| 71 | if (endptr == s) return 0; /* no conversion */ | 71 | if (endptr == s) return 0; /* no conversion */ |
| 72 | while (isspace((unsigned char)*endptr)) endptr++; | 72 | while (isspace((unsigned char)*endptr)) endptr++; |
| 73 | if (*endptr != '\0') return 0; /* invalid trailing characters? */ | 73 | if (*endptr != '\0') return 0; /* invalid trailing characters? */ |
