On Fri, Dec 31, 2004 at 03:04:49PM +0000, [EMAIL PROTECTED] wrote: > Nicholas Clark <[EMAIL PROTECTED]> wrote: > :The appended patch seems to cure the problem for me, but I'm not confident > :that it's the correct way. > > I notice that this changes the order things are stacked; I'm not sure if > that's ever going to be relevant. In particularly this swaps the first > two of the sequence: > PUSHSTACKi; ENTER; LEAVE; POPSTACK > .. but I'm not sure what they all do without expanding a lot of macros.
I'd have thought that the better approach would be to move the if (!gv_fetchmeth(stash, "SWASHNEW", 8, -1)) { /* demand load utf8 */ block further down to just above the line if (call_method("SWASHNEW", G_SCALAR)) then the call to Perl_load_module is protected by the PUSHSTACKi. Note that PUSHSTACKi is needed any place where the caller isn't prepared for the stack to get extended and thus possibly reallocated (thus invalidating SP etc). It gives you a brand new stack to play with. -- In England there is a special word which means the last sunshine of the summer. That word is "spring".