This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [PATCH] Add support for /k modfier for matching along with ${^PREMATCH}, ${^MATCH...
[perl5.git] / regcomp.c
index d07f177..b5faf28 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -8869,7 +8869,7 @@ Perl_reg_stringify(pTHX_ MAGIC *mg, STRLEN *lp, U32 *flags, I32 *haseval ) {
     const regexp * const re = (regexp *)mg->mg_obj;
 
     if (!mg->mg_ptr) {
-       const char *fptr = "msix";
+       const char *fptr = STD_PAT_MODS;        /*"msix"*/
        char reflags[7];
        char ch;
        bool hask = ((re->extflags & RXf_PMf_KEEPCOPY) == RXf_PMf_KEEPCOPY);
@@ -8879,7 +8879,7 @@ Perl_reg_stringify(pTHX_ MAGIC *mg, STRLEN *lp, U32 *flags, I32 *haseval ) {
         int left = 0;
        int right = 4 + hask;
         if (hask) 
-            reflags[left++]='k';
+            reflags[left++] = KEEPCOPY_PAT_MOD; /*'k'*/
        while((ch = *fptr++)) {
            if(reganch & 1) {
                reflags[left++] = ch;