Skip to content

Use bool instead of Qtrue/Qfalse for normal c boolish value #395

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

Merged
merged 1 commit into from
Jul 29, 2025

Conversation

tompng
Copy link
Member

@tompng tompng commented Jul 29, 2025

BigDecimal_DoDivmod, a normal c function that returns bool result should use true/false instead of Qtrue(20)/Qfalse(0)

BigDecimal_DoDivmod is used as:

if (BigDecimal_DoDivmod(self, r, &div, &mod, false)) { // This works because Qfalse is 0
   return CheckGetValue(bdvalue_nonnullable(mod));
}
return DoSomeOne(self, r, '%');

BigDecimal_DoDivmod, a normal c function that returns bool result should use true/false instead of Qtrue(20)/Qfalse(0)
@tompng tompng merged commit fd375a7 into ruby:master Jul 29, 2025
79 checks passed
@tompng tompng deleted the dodivmod_bool branch July 29, 2025 19:34
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