develooper Front page | perl.perl5.porters | Postings from April 2007

Where does $1 get its READONLY flag?

Thread Next
Ævar Arnfjörð Bjarmason
April 7, 2007 22:38
Where does $1 get its READONLY flag?
Message ID:
I'm trying to find out where $1 gets its READONLY flag to make C<$1 =
"ook"> work (see previous threads), but I'm not familiar enough with
the magic or perl's flow to know where the stack item sassign gets
comes from. So, uh, hints?:)

(gdb) break Perl_pp_sassign
Breakpoint 12 at 0x80f0169: file pp_hot.c, line 124.
(gdb) run -e 'print($1 = "ook")'
Starting program: /usr/local/bin/perl5.9.5 -e 'print($1 = "ook")'

Breakpoint 12, Perl_pp_sassign () at pp_hot.c:124
(gdb) n
(gdb) p SvFLAGS(right) & SVf_READONLY
$13 = 134217728

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