Support numeric constraints for Decimal types#692
Support numeric constraints for Decimal types#692cocorigon wants to merge 2 commits intojcrist:mainfrom
Conversation
|
Hi @cocorigon! I've run into the same issue (#683) in production - Are you still planning to rebase this PR and continue working on it? If not, I'd be happy to pick it up - would open a fresh PR based on your approach, with credit of course. No rush, just want to make sure the effort isn't duplicated. |
|
Hey @Siyet! I don't really do much Python anymore, so no, I will not work on this PR again in the near future. So feel free to use this code as you wish! |
|
Hi @cocorigon, thanks again for the original work here and for the explicit handover note above. I've picked this up in #1006, which builds on the same approach (C-level constraint check, |
This is my first time playing around with C, so please feel free to tell me if more micro-optimizations can be achieved. Same for compiler hints, notably for the
MS_INLINEandMS_NOINLINEnearms_check_decimal_constraints(...): I implemented it in a manner similar to what was done for floats for example, though I must admit that I did not quite understand the pattern for when to use each.Also, I added a DevContainer for easier setup for newcomers to the project.
Closes #683.