| 221 | #endif |
| 222 | |
| 223 | static const char *l_str2dloc (const char *s, lua_Number *result, int mode) { |
| 224 | char *endptr; |
| 225 | *result = (mode == 'x') ? lua_strx2number(s, &endptr) /* try to convert */ |
| 226 | : lua_str2number(s, &endptr); |
| 227 | if (endptr == s) return NULL; /* nothing recognized? */ |
| 228 | while (lisspace(cast_uchar(*endptr))) endptr++; /* skip trailing spaces */ |
| 229 | return (*endptr == '\0') ? endptr : NULL; /* OK if no trailing characters */ |
| 230 | } |
| 231 | |
| 232 | |
| 233 | /* |
no test coverage detected