develooper Front page | perl.perl5.porters | Postings from May 2019

[perl #134032] Devel::PPPort makes incorrect suggestion for changingPerl_filter_read

Thread Next
Karl Williamson via RT
May 9, 2019 20:57
[perl #134032] Devel::PPPort makes incorrect suggestion for changingPerl_filter_read
Message ID:
On Tue, 23 Apr 2019 18:56:18 -0700, tonyc wrote:
> On Sun, 14 Apr 2019 11:15:27 -0700, wrote:
> > A while ago I applied some changes to B::Hooks::Parser as suggested
> > by
> > ppport.h:
> >
> >
> > Parser/commit/66a934c02168048cebeb5a95d6ad3bbbe6e8f707
> >
> > ..and then yesterday released as
> >
> >
> > This failed on threaded builds:
> >
> I expect the output from ppport.h is intended for callers of the perl
> API filter_read() rather than for code that tries to redefine it.
> Calling the filter_read() macro instead of using Perl_filter_read() is
> good advice for callers of filter_read(), I don't think it's necessary
> for it to deal with the hopefully much less common case of code that
> tries to redefine perl API functions.
> Tony

I've studied this more, and I agree with Tony.  I'm thinking this ticket should be rejected.

The problem is that this is using stolen core code, which is a situation we want to avoid, and should be quite rare.  And I don't think it's worth enhancing ppport to handle this unlikely case.  I looked at its code, and it does handle the case of a call to such a function, noting the aTHX_, and including its removal in the suggestion.  But it has no current way of coping with a function definition which uses pTHX_ instead.  If someone wanted to undertake doing this, I'd be happy to accept their pull request.  But there are much more important things to spend one's time on.
Karl Williamson

via perlbug:  queue: perl5 status: open

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