develooper Front page | perl.perl5.porters | Postings from October 2000

Re: Did change 1307 (GSAR) break self ties?

Thread Previous | Thread Next
Alan Burlison
October 2, 2000 11:20
Re: Did change 1307 (GSAR) break self ties?
Message ID:
Nick Ing-Simmons wrote:

> As I said in earlier mail - there is code in mg.c i.e. mg_get
> which does
> save_magic();
> ...
> restore_magic();

Yes - I had a look at that, but it is all local to mg.c.  I was hesitant
to make it global in scope because I wasn't sure of the implications WRT
binary compatibility etc - there are some warnings in on the
subject.  I did try a hacked up version, but it just cored - I think I'd
somehow screwed up the savestack.  I havn't had time to figure out
exactly how I broke it. 

> And there is MGf_GSKIP which is tested as well.

I can't find an explanation of what this is supposed to do, but from
looking at mg.c I assume it is meant to suppress magic get method calls
- correct?

> But the code for FETCH does:
> int
> Perl_magic_getpack(pTHX_ SV *sv, MAGIC *mg)
> {
>     magic_methpack(sv,mg,"FETCH");
>     if (mg->mg_ptr)
>         mg->mg_flags |= MGf_GSKIP;
>     return 0;
> }
> i.e. it sets the "skip" flag _after_ calling the method - which seems odd.

I tried swapping it around, and although it doesn't break anything (make
test is still OK) it doesn't cure the problem.

Alan Burlison
Solaris Kernel Development, Sun Microsystems

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