RE: pushing method handlers by reference

2001-08-28 Thread Geoffrey Young
> -Original Message- > From: Doug MacEachern [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 28, 2001 11:37 AM > To: Geoffrey Young > Cc: '[EMAIL PROTECTED]' > Subject: RE: pushing method handlers by reference > > > one problem, i think there&#

RE: pushing method handlers by reference

2001-08-28 Thread Doug MacEachern
one problem, i think there's a leak here: + pclass = newSVpv(HvNAME(stash),0); since pclass was already set to newSVsv(sv) at the beginning. can you test changing to: sv_setpv(pclass, HvNAME(stash)); - To unsubsc

RE: pushing method handlers by reference

2001-08-27 Thread Geoffrey Young
ok, here it is as an attachment - outlook has a way of munging patches with long lines... anyway, thanks for helping me work through this... --Geoff mod_perl.c.diff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: pushing method handlers by reference

2001-08-27 Thread Doug MacEachern
On Mon, 27 Aug 2001, Geoffrey Young wrote: > do I need some sort of check on cv before calling perl_cv_ismethod(cv) here? if cv is returned from sv_2cv() just checking that its not NULL should be fine. > I guess the last thing is - how do I check my refcounts to make sure I got > all the dec

RE: pushing method handlers by reference

2001-08-27 Thread Geoffrey Young
> > > > just out of curiosity, I tried to get the method name from > the gv returned > > from sv_2cv using GvNAME and kept segfaulting, then I > noticed you never used > > that gv in similar calls... is that gv unreliable? > > not sure, but CvGV(cv) should be reliable. yeah, that's working f

RE: pushing method handlers by reference

2001-08-27 Thread Doug MacEachern
On Mon, 27 Aug 2001, Geoffrey Young wrote: > > ok, here is my first go - I'm not sure if it is sylistically what you were > after, but I will rework it some to suit now that the proof-of-concept is > over... > > just out of curiosity, I tried to get the method name from the gv returned > from s

RE: pushing method handlers by reference

2001-08-27 Thread Geoffrey Young
ok, here is my first go - I'm not sure if it is sylistically what you were after, but I will rework it some to suit now that the proof-of-concept is over... just out of curiosity, I tried to get the method name from the gv returned from sv_2cv using GvNAME and kept segfaulting, then I noticed yo

RE: pushing method handlers by reference

2001-08-25 Thread Geoffrey Young
>you should be able to use the current code: >is_method = 1; #based on your check >pclass = HvNAME(stash); >method = GvNAME(CvGV(cv)); cool. ok, I'll work on it and see what I come up with... --Geoff - To unsubscribe, e-ma

RE: pushing method handlers by reference

2001-08-25 Thread Doug MacEachern
On Sat, 25 Aug 2001, Geoffrey Young wrote: > cv = sv_2cv(sv, &stash, &gv, FALSE); > if (cv && (CvFLAGS(cv) & CVf_METHOD)) { > PUSHMARK(SP); > XPUSHs(newSVpv(HvNAME(stash),0)); > PUTBACK; > perl_call_sv(sv, G_METHOD); > } you should be able to use the current code: is_metho

RE: pushing method handlers by reference

2001-08-25 Thread Geoffrey Young
> > > > the below patches allow the following formats, in > addition to what is > > already currently supported > > > > $r->push_handlers(PerlFixupHandler => My::Class->can('foo')); > > $r->set_handlers(PerlFixupHandler => [My::Class->can('foo')]); > > cool! i don't understand why univ

Re: pushing method handlers by reference

2001-08-25 Thread Doug MacEachern
On Wed, 15 Aug 2001, Geoffrey Young wrote: > hi all... > > I just got around to fixing something that has been a splinter in my mind > for a while now... > > it all started with Andrew Ford documenting that push_handlers() didn't > work for method handlers. it turns out they work just fine

pushing method handlers by reference

2001-08-15 Thread Geoffrey Young
hi all... I just got around to fixing something that has been a splinter in my mind for a while now... it all started with Andrew Ford documenting that push_handlers() didn't work for method handlers. it turns out they work just fine so long as you use the (undocumented?) string literal for