This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Change return type of regcurly to bool
authorKarl Williamson <khw@cpan.org>
Thu, 16 Jan 2020 23:07:12 +0000 (16:07 -0700)
committerKarl Williamson <khw@cpan.org>
Thu, 23 Jan 2020 22:46:56 +0000 (15:46 -0700)
This internal function is more properly bool, not I32.

embed.fnc
inline.h
proto.h

index 20903cf..bb91d3a 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1164,7 +1164,7 @@ EpRX      |const char *|form_alien_digit_msg|const U8 which       \
                                |const bool braced
 #endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C)
-EiRT   |I32    |regcurly       |NN const char *s
+EiRT   |bool   |regcurly       |NN const char *s
 #endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_DQUOTE_C)
 EpRX   |const char *|form_cp_too_large_msg|const U8 which      \
index 621857a..e4bd680 100644 (file)
--- a/inline.h
+++ b/inline.h
@@ -1987,7 +1987,7 @@ S_lossless_NV_to_IV(const NV nv, IV *ivp)
  - regcurly - a little FSA that accepts {\d+,?\d*}
     Pulled from reg.c.
  */
-PERL_STATIC_INLINE I32
+PERL_STATIC_INLINE bool
 S_regcurly(const char *s)
 {
     PERL_ARGS_ASSERT_REGCURLY;
diff --git a/proto.h b/proto.h
index 2b14428..0c5b766 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -5906,7 +5906,7 @@ PERL_CALLCONV SV* Perl_invlist_clone(pTHX_ SV* const invlist, SV* newlist);
 #endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C)
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE I32 S_regcurly(const char *s)
+PERL_STATIC_INLINE bool        S_regcurly(const char *s)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_REGCURLY      \
        assert(s)