New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
experimental bitwise feature breaks PDL's & operator #16307
Comments
From @djeriusCreated by @djeriusThe experimental bitwise feature breaks PDL code which uses the overloaded '&' operator. Sample code: ----------------------------------- use PDL; print "\n"; print "bitwise off: ", pdl( 1 ) & pdl(2 ), "\n"; use feature 'bitwise'; print "bitwise on: ", pdl( 1 ) & pdl(2 ), "\n"; ----------------------------------- The output: ----------------------------------- % perl bitwise.pl bitwise off: 0 ----------------------------------- PDL::and2 is an XS function which provides the overloaded behavior. Its arguments are getting changed by Thanks, Perl Info
|
From @cpansproutOn Fri, 15 Dec 2017 14:28:25 -0800, djerius wrote:
Due to the nature of the bitwise feature, it is necessary to pass extra arguments to overload functions. overload.pm says the following: If the experimental "bitwise" feature is enabled (see feature), a fifth I have submitted a PDL patch at <https://rt.cpan.org/Ticket/Display.html?id=123901>. There is no Perl bug here. -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
@cpansprout - Status changed from 'open' to 'rejected' |
From @sisyphusNote that both Math::GMP and Math::GMPz are also similarly broken by ################################ print Math::GMP->new(2) & Math::GMP->new(3); C:\_32>perl bitwise.pl C:\_32> I've submitted a bug report against Math::GMP for this (see I'll fix Math::GMPz as soon as I work out how best to deal with this from I wonder how many other modules might be broken by this feature. Cheers, |
From zefram@fysh.orgSisyphus via RT wrote:
From the fifth argument supplied to the xsub. But Math::GMP has no need
It doesn't. The warning happens in the calling scope, which is where -zefram |
From @djeriusOn Sun, Dec 17, 2017 at 2:08 PM, Father Chrysostomos via RT
Thanks. PDL doesn't use rt.cpan.org for bug-tracking, so I've submitted a |
From @sisyphusOn Mon, 18 Dec 2017 04:32:40 -0800, zefram@fysh.org wrote:
Oh, I see. 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, |
From @cpansproutOn Mon, 18 Dec 2017 16:06:00 -0800, sisyphus wrote:
FYI, I have added an explanation to perlxs.pod in commit daf3bcf. -- Father Chrysostomos |
Migrated from rt.perl.org#132589 (status was 'rejected')
Searchable as RT132589$
The text was updated successfully, but these errors were encountered: