develooper Front page | perl.perl5.porters | Postings from December 2017

[perl #132589] experimental bitwise feature breaks PDL's & operator

Thread Previous | Thread Next
From:
Sisyphus via RT
Date:
December 19, 2017 00:06
Subject:
[perl #132589] experimental bitwise feature breaks PDL's & operator
Message ID:
rt-4.0.24-9986-1513641960-627.132589-15-0@perl.org
On Mon, 18 Dec 2017 04:32:40 -0800, zefram@fysh.org wrote:
> Sisyphus via RT wrote:
> >I need to find out:
> >1) How does the XSub establish that the caller has enabled the bitwise 
> >feature;
> 
> From the fifth argument supplied to the xsub.  But Math::GMP has no need
> to know that, because its bitwise operators only provide numeric behaviour
> in any case.  There's no difference to Math::GMP between the old ambiguous
> conjunction and the new numeric-only conjunction.  Math::GMP::band()
> should ignore the fifth argument (and the fourth, and the third).
> 
> >2) How does the XSub silence the warning.
> 
> It doesn't.  The warning happens in the calling scope, which is where
> the bitwise feature is enabled, and it can be silenced by that scope's
> warning flags.
> 
> -zefram

Oh, I see.
It's as simple as appending a "..." to the argument list.
At least that's all that Math::GMPz needs, and I presume the same would hold for Math::GMP.

The far more elaborate PDL patch that FC provided threw me a bit. But I can well believe that PDL, being what it is, would require a more elaborate fix.

Cheers,
Rob




---
via perlbug:  queue: perl5 status: rejected
https://rt.perl.org/Ticket/Display.html?id=132589

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About