Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pp_substr: no need to redo work when cloning the replacement string
Currently, when copying the replacement string in preparation for `sv_utf8_upgrade()`, `pp_substr` calls: repl_sv_copy = newSVsv(repl_sv); However, `repl_sv` was previously checked for GMAGIC, coerced to a string if necessary, and the char * and length obtained by: repl = SvPV_const(repl_sv, repl_len); We should be able to produce a copy more directly by just doing: repl_sv_copy = newSVpvn(repl, repl_len);
- Loading branch information