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 embed.pl 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 MicrosystemsThread Previous | Thread Next