summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-01-06 17:32:35 -0700
committerKarl Williamson <khw@cpan.org>2020-01-13 20:58:56 -0700
commitbcfb98ec0765d242dbd6338c36fb54cd40f6a9d9 (patch)
treecce60921b8e5f81b4ad5c3accf423a2f6ad75ba9 /proto.h
parent2ae9030c44be214caa0d1eeafad9425a53344feb (diff)
downloadperl-bcfb98ec0765d242dbd6338c36fb54cd40f6a9d9.tar.gz
Collapse grok_bin, _oct, _hex into one function
These functions are identical in logic in the main loop, the difference being which digits they accept. The rest of the code had slight variations. This commit unifies the functions. I presume the reason they were kept separate was because of speed. Future commits will make this unified function faster than blead, and the reduced maintenance cost makes this worthwhile.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index a0abbdddf3..7c719b5e42 100644
--- a/proto.h
+++ b/proto.h
@@ -1148,6 +1148,9 @@ PERL_CALLCONV bool Perl_grok_atoUV(const char* pv, UV* valptr, const char** endp
PERL_CALLCONV UV Perl_grok_bin(pTHX_ const char* start, STRLEN* len_p, I32* flags, NV *result);
#define PERL_ARGS_ASSERT_GROK_BIN \
assert(start); assert(len_p); assert(flags)
+PERL_CALLCONV UV Perl_grok_bin_oct_hex(pTHX_ const char* start, STRLEN* len_p, I32* flags, NV *result, const unsigned shift);
+#define PERL_ARGS_ASSERT_GROK_BIN_OCT_HEX \
+ assert(start); assert(len_p); assert(flags)
PERL_CALLCONV UV Perl_grok_hex(pTHX_ const char* start, STRLEN* len_p, I32* flags, NV *result);
#define PERL_ARGS_ASSERT_GROK_HEX \
assert(start); assert(len_p); assert(flags)