| 249 | #endif |
| 250 | |
| 251 | static const char *l_str2dloc (const char *s, lua_Number *result, int mode) { |
| 252 | char *endptr; |
| 253 | *result = (mode == 'x') ? lua_strx2number(s, &endptr) /* try to convert */ |
| 254 | : lua_str2number(s, &endptr); |
| 255 | if (endptr == s) return NULL; /* nothing recognized? */ |
| 256 | while (lisspace(cast_uchar(*endptr))) endptr++; /* skip trailing spaces */ |
| 257 | return (*endptr == '\0') ? endptr : NULL; /* OK if no trailing characters */ |
| 258 | } |
| 259 | |
| 260 | |
| 261 | /* |
no test coverage detected