CC: | Perl 5 Porters <perl5-porters [...] perl.org>, bug-Clone [...] rt.cpan.org |
Subject: | Re: Clone fails to build with blead@34780 |
Date: | Mon, 10 Nov 2008 08:30:12 +0100 |
To: | Michael G Schwern <schwern [...] pobox.com> |
From: | Marcus Holland-Moritz <mhx-perl [...] gmx.net> |
On 2008-11-09, at 18:03:55 -0800, Michael G Schwern wrote:
Show quoted text
> There's a regression with Clone 0.29 and blead@34780 on OS X 10.4.
>
> $ bleadperl Makefile.PL Checking if your kit is complete...
> Looks good
> Writing Makefile for Clone
>
> $ make
> cp Clone.pm blib/lib/Clone.pm
> AutoSplitting blib/lib/Clone.pm (blib/lib/auto/Clone)
> /usr/local/bin/bleadperl /usr/local/perl/blead/lib/5.11.0/ExtUtils/xsubpp
> -typemap /usr/local/perl/blead/lib/5.11.0/ExtUtils/typemap Clone.xs >
> Clone.xsc && mv Clone.xsc Clone.c
> cc -c -I/sw/include -DDEBUGGING -fno-strict-aliasing -pipe
> -I/usr/local/include -I/opt/local/include -O3 -DVERSION=\"0.29\"
> -DXS_VERSION=\"0.29\"
> "-I/usr/local/perl/blead/lib/5.11.0/darwin-thread-multi-2level/CORE" Clone.c
> Clone.xs: In function ‘sv_clone’:
> Clone.xs:286: error: assignment of read-only location
> make: *** [Clone.o] Error 1
I think something similar to #34770 needs to be done for SvRV(),
for compatibility reasons. (I just can't do it right now.)
But ultimately, Clone should start using SvRV_set() instead
of assigning to SvRV().
Marcus
Show quoted text> The lines in question...
>
> 122 static SV *
> 123 sv_clone (SV * ref, int depth)
> 124 {
> 125 SV *clone = ref;
> ...
> 282 else if (SvROK (ref))
> 283 {
> 284 TRACEME(("clone = 0x%x(%d)\n", clone, SvREFCNT(clone)));
> 285 SvREFCNT_dec(SvRV(clone));
> 286 SvRV(clone) = sv_clone (SvRV(ref), depth); /* Clone the referent */
> 287 if (sv_isobject (ref))
> 288 {
> 289 sv_bless (clone, SvSTASH (SvRV (ref)));
> 290 }
> 291 if (SvWEAKREF(ref)) {
> 292 sv_rvweaken(clone);
> 293 }
> 294 }
>
>
> --
> Look at me talking when there's science to do.
> When I look out there it makes me glad I'm not you.
> I've experiments to be run.
> There is research to be done
> On the people who are still alive.
> -- Jonathan Coulton, "Still Alive"
Message body not shown because it is not plain text.