aboutsummaryrefslogtreecommitdiff
path: root/lobject.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-12-04 16:33:40 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-12-04 16:33:40 -0200
commit4894c2796277b47b0ffc8983e8231d2cc95ee09b (patch)
treedc702c79716a42f22301bc5b9b5798a28173f7c2 /lobject.c
parent10ac68c648e0e1d23fe5485bc711df8fc71b6ae3 (diff)
downloadlua-4894c2796277b47b0ffc8983e8231d2cc95ee09b.tar.gz
lua-4894c2796277b47b0ffc8983e8231d2cc95ee09b.tar.bz2
lua-4894c2796277b47b0ffc8983e8231d2cc95ee09b.zip
lua_Number defined in lua.h (1st version)
Diffstat (limited to 'lobject.c')
-rw-r--r--lobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lobject.c b/lobject.c
index 9e6504ab..5f9876c0 100644
--- a/lobject.c
+++ b/lobject.c
@@ -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
68int luaO_str2d (const char *s, Number *result) { /* LUA_NUMBER */ 68int 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? */