Skip to content
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

Fix defined or to not force boolean context #352

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

mohawk2
Copy link
Contributor

@mohawk2 mohawk2 commented Nov 19, 2024

For // and //= operations, Devel::Cover was until this PR imposing boolean context. This is usually invisible, but breaks PDL where multi-element ndarrays die if boolean context is imposed, which is wrong if they're being //= instead.

This fixes that by adding the notion of "true-ish", which for dor and dorassign is SvOK, not SvTRUE.

By the way, I imitated the style that was there already and used #ifdef, but the Makefile.PL has use 5.012 at the top. Should the metadata have that added too? And would you be happy for me to PR (or you can do it) removing the conditional stuff for < 5.12? In fact I have included this, because the conditional stuff made the DOR code very complicated for no good reason.

@mohawk2 mohawk2 force-pushed the fix-defined-or branch 3 times, most recently from 386cf68 to 723b601 Compare November 19, 2024 11:24
@mohawk2 mohawk2 force-pushed the fix-defined-or branch 2 times, most recently from aea92e4 to 03a24c8 Compare November 20, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant