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

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

Thread Previous | Thread Next
Sisyphus via RT
December 19, 2017 00:06
[perl #132589] experimental bitwise feature breaks PDL's & operator
Message ID:
On Mon, 18 Dec 2017 04:32:40 -0800, 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.


via perlbug:  queue: perl5 status: rejected

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