This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove unused USING_WIDE code from win32 and wince branches
[perl5.git] / regcomp.c
index 744b380..dd2188f 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -6072,7 +6072,7 @@ Perl_pregfree(pTHX_ struct regexp *r)
                        reg_trie_data *trie=(reg_trie_data*)r->data->data[n];
                        U32 refcount;
                        OP_REFCNT_LOCK;
-                       refcount = trie->refcount--;
+                       refcount = --trie->refcount;
                        OP_REFCNT_UNLOCK;
                        if ( !refcount ) {
                            Safefree(trie->charmap);
@@ -6218,8 +6218,8 @@ Perl_save_re_context(pTHX)
            for (i = 1; i <= rx->nparens; i++) {
                GV *mgv;
                char digits[TYPE_CHARS(long)];
-               sprintf(digits, "%lu", (long)i);
-               if ((mgv = gv_fetchpv(digits, FALSE, SVt_PV)))
+               const STRLEN len = my_sprintf(digits, "%lu", (long)i);
+               if ((mgv = gv_fetchpvn_flags(digits, len, FALSE, SVt_PV)))
                    save_scalar(mgv);
            }
        }