develooper Front page | perl.perl5.porters | Postings from March 2008

Re: [PATCH] Double magic with substr

Thread Previous
Rafael Garcia-Suarez
March 31, 2008 12:49
Re: [PATCH] Double magic with substr
Message ID:
On 31/03/2008, Vincent Pit <> wrote:
> substr currently calls get magic twice on the substr'd string :
>  - the first one fires with SvPV_const(sv, curlen) in pp_substr ;
>  - the second one occurs with SvPV_force(bigstr, curlen) at sv_insert.
>  Rafael and Nicholas agreed that we should implement a sv_insert_flags,
>  and here's the thing.
>  The new sv_insert_flags is the same as the old sv_insert, except that
>  SvPV_force was replaced by SvPV_force_flags, to which the flags are
>  directly passed down. I also updated the corresponding call in
>  pp_substr. From what I've tested with Variable::Magic, this seemed to
>  fix the double magic in all cases.
>  I kept a symbol to the old Perl_sv_insert so that modules built against
>  it can still link, but I don't know if this has to be expected or if
>  there's a better way to achieve it.
>  Regen ran, tested ok against 33612.

Thanks, applied as change #33618.

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About