diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-27 17:21:56 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-27 17:21:56 -0200 |
commit | 4870194380c4fcf40ffa20ef06956a462b3fd10c (patch) | |
tree | 4a7e258c09af6785e6d30e10a724e94632cf6b35 /lobject.c | |
parent | 41d0e661846275994262f7e94c879d02254ef0ef (diff) | |
download | lua-4870194380c4fcf40ffa20ef06956a462b3fd10c.tar.gz lua-4870194380c4fcf40ffa20ef06956a462b3fd10c.tar.bz2 lua-4870194380c4fcf40ffa20ef06956a462b3fd10c.zip |
small reorganization of tests around LUA_USE_C99
Diffstat (limited to 'lobject.c')
-rw-r--r-- | lobject.c | 22 |
1 files changed, 2 insertions, 20 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.c,v 2.94 2014/10/24 11:42:29 roberto Exp roberto $ | 2 | ** $Id: lobject.c,v 2.95 2014/10/25 11:50:46 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 | */ |
@@ -162,24 +162,8 @@ static int isneg (const char **s) { | |||
162 | } | 162 | } |
163 | 163 | ||
164 | 164 | ||
165 | /* | ||
166 | ** {====================================================== | ||
167 | ** lua_strx2number converts an hexadecimal numeric string to a number. | ||
168 | ** In C99, 'strtod' does both conversions. C89, however, has no function | ||
169 | ** to convert floating hexadecimal strings to numbers. For these | ||
170 | ** systems, you can leave 'lua_strx2number' undefined and Lua will | ||
171 | ** provide its own implementation. | ||
172 | ** ======================================================= | ||
173 | */ | ||
174 | #if !defined(lua_strx2number) /* { */ | ||
175 | |||
176 | #if defined(LUA_USE_C99) /* { */ | ||
177 | |||
178 | #define lua_strx2number(s,p) lua_str2number(s,p) | ||
179 | |||
180 | #else /* }{ */ | ||
181 | |||
182 | /* Lua's implementation for 'lua_strx2number' */ | 165 | /* Lua's implementation for 'lua_strx2number' */ |
166 | #if !defined(lua_strx2number) /* { */ | ||
183 | 167 | ||
184 | #include <math.h> | 168 | #include <math.h> |
185 | 169 | ||
@@ -247,8 +231,6 @@ static lua_Number lua_strx2number (const char *s, char **endptr) { | |||
247 | 231 | ||
248 | #endif /* } */ | 232 | #endif /* } */ |
249 | 233 | ||
250 | #endif /* } */ | ||
251 | |||
252 | /* }====================================================== */ | 234 | /* }====================================================== */ |
253 | 235 | ||
254 | 236 | ||