This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Peephole optimise adjacent pairs of nextstate ops.
[perl5.git] / handy.h
diff --git a/handy.h b/handy.h
index d17b8d3..bbeb1ff 100644 (file)
--- a/handy.h
+++ b/handy.h
@@ -314,6 +314,13 @@ Like C<hv_fetch>, but takes a literal string instead of a string/length pair.
 Like C<hv_store>, but takes a literal string instead of a string/length pair
 and omits the hash parameter.
 
+=head1 Lexer interface
+
+=for apidoc Amx|void|lex_stuff_pvs|const char *pv|U32 flags
+
+Like L</lex_stuff_pvn>, but takes a literal string instead of a
+string/length pair.
+
 =cut
 */
 
@@ -344,6 +351,8 @@ and omits the hash parameter.
   ((SV **)Perl_hv_common(aTHX_ (hv), NULL, STR_WITH_LEN(key), 0,       \
                         (HV_FETCH_ISSTORE|HV_FETCH_JUST_SV), (val), 0))
 
+#define lex_stuff_pvs(pv,flags) Perl_lex_stuff_pvn(aTHX_ STR_WITH_LEN(pv), flags)
+
 #define get_cvs(str, flags)                                    \
        Perl_get_cvn_flags(aTHX_ STR_WITH_LEN(str), (flags))
 
@@ -468,6 +477,9 @@ NOTE:  Since some of these are macros, there is no check in those that the
 parameter is a char or U8.  This means that if called with a larger width
 parameter, casts can silently truncate and yield wrong results.
 
+Also note that these macros are repeated in Devel::PPPort, so should also be
+patched there.  The file as of this writing is cpan/Devel-PPPort/parts/inc/misc
+
 */
 
 #define isALNUM(c)     (isALPHA(c) || isDIGIT(c) || (c) == '_')
@@ -916,6 +928,7 @@ void Perl_mem_log_del_sv(const SV *sv, const char *filename, const int linenumbe
 #endif
 
 #define C_ARRAY_LENGTH(a)      (sizeof(a)/sizeof((a)[0]))
+#define C_ARRAY_END(a)         (a) + (sizeof(a)/sizeof((a)[0]))
 
 #ifdef NEED_VA_COPY
 # ifdef va_copy