Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Adam Turner <[email protected]>
  • Loading branch information
skirpichev and AA-Turner authored Aug 21, 2025
commit d3f8428d385d93d16d440714f8eb02c849821608
22 changes: 17 additions & 5 deletions Modules/_decimal/_decimal.c
Original file line number Diff line number Diff line change
Expand Up @@ -4346,7 +4346,9 @@ nm_##MPDFUNC(PyObject *self, PyObject *other) \
return result; \
}

/* Boolean function without a context arg. */
/* Boolean function without a context arg.
Argument Clinic provides PyObject *self
*/
#define Dec_BoolFunc(MPDFUNC) \
{ \
return MPDFUNC(MPD(self)) ? incr_true() : incr_false(); \
Expand Down Expand Up @@ -4419,7 +4421,10 @@ nm_##MPDFUNC(PyObject *self, PyObject *other) \

/* Binary function with an optional context arg. Actual MPDFUNC does
NOT take a context. The context is used to record InvalidOperation
if the second operand cannot be converted exactly. */
if the second operand cannot be converted exactly.

Argument Clinic provides PyObject *self, PyObject *other, PyObject *context
*/
#define Dec_BinaryFuncVA_NO_CTX(MPDFUNC) \
{ \
PyObject *a, *b; \
Expand Down Expand Up @@ -6047,7 +6052,9 @@ static PyType_Spec dec_spec = {
return ret; \
}

/* Unary context method. */
/* Unary context method.
Argument Clinic provides PyObject *context, PyObject *x
*/
#define DecCtx_UnaryFunc(MPDFUNC) \
{ \
PyObject *result, *a; \
Expand All @@ -6071,7 +6078,9 @@ static PyType_Spec dec_spec = {
return result; \
}

/* Binary context method. */
/* Binary context method.
Argument Clinic provides PyObject *context, PyObject *v, PyObject *w
*/
#define DecCtx_BinaryFunc(MPDFUNC) \
{ \
PyObject *a, *b; \
Expand Down Expand Up @@ -6130,7 +6139,10 @@ ctx_##MPDFUNC(PyObject *context, PyObject *args) \
return result; \
}

/* Ternary context method. */
/* Ternary context method.
Argument Clinic provides PyObject *context, PyObject *v, PyObject *w,
PyObject *x
*/
#define DecCtx_TernaryFunc(MPDFUNC) \
{ \
PyObject *a, *b, *c; \
Expand Down
Loading