readint.c (mrb_int_read): new function.

We no longer use `mrb_read_int` which is kinda compatible with `strtol`.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2022-11-05 23:36:49 +09:00
parent 440adc447b
commit 4e9773ae3d
6 changed files with 23 additions and 21 deletions
+3 -1
View File
@@ -100,7 +100,9 @@ struct mrb_state;
# define MRB_ENDIAN_LOHI(a,b) b a
#endif
MRB_API mrb_int mrb_int_read(const char *p, const char *e, char **endp);
MRB_API mrb_bool mrb_read_int(const char *p, const char *e, char **endp, mrb_int *np);
/* obsolete; do not use mrb_int_read() */
MRB_API mrb_int mrb_int_read(const char*, const char*, char**);
#ifndef MRB_NO_FLOAT
MRB_API double mrb_float_read(const char*, char**);
#ifdef MRB_USE_FLOAT32