From 92e2a7048ef575bab6b166533340e91a8281d62a Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 16 Mar 2017 03:21:12 +0000 Subject: bignum.c: rb_int_parse_cstr * bignum.c (rb_int_parse_cstr): extend rb_cstr_parse_inum with flags. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- internal.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'internal.h') diff --git a/internal.h b/internal.h index 06455f9409..f011b7acbc 100644 --- a/internal.h +++ b/internal.h @@ -1746,6 +1746,14 @@ VALUE rb_big_divrem_gmp(VALUE x, VALUE y); VALUE rb_big2str_gmp(VALUE x, int base); VALUE rb_str2big_gmp(VALUE arg, int base, int badcheck); #endif +enum rb_int_parse_flags { + RB_INT_PARSE_SIGN = 0x01, + RB_INT_PARSE_UNDERSCORE = 0x02, + RB_INT_PARSE_PREFIX = 0x04, + RB_INT_PARSE_ALL = 0x07, + RB_INT_PARSE_DEFAULT = 0x07 +}; +VALUE rb_int_parse_cstr(const char *str, ssize_t len, char **endp, size_t *ndigits, int base, int flags); /* error.c (export) */ int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data); -- cgit v1.2.3