This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
sv_cathek
[perl5.git] / sv.h
diff --git a/sv.h b/sv.h
index 753b5bb..d71b9fd 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -1970,6 +1970,12 @@ mg.c:1024: warning: left-hand operand of comma expression has no effect
                             (littlelen), SV_GMAGIC)
 #define sv_mortalcopy(sv) \
        Perl_sv_mortalcopy_flags(aTHX_ sv, SV_GMAGIC|SV_DO_COW_SVSETSV)
+#define sv_cathek(sv,hek)                                          \
+       STMT_START {                                                 \
+           HEK * const bmxk = hek;                                   \
+           sv_catpvn_flags(sv, HEK_KEY(bmxk), HEK_LEN(bmxk),          \
+                           HEK_UTF8(bmxk) ? SV_CATUTF8 : SV_CATBYTES); \
+       } STMT_END
 
 /* Should be named SvCatPVN_utf8_upgrade? */
 #define sv_catpvn_nomg_utf8_upgrade(dsv, sstr, slen, nsv)      \