summaryrefslogtreecommitdiffstats
path: root/Python/generated_cases.c.h
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-10-14 13:18:57 (GMT)
committerGitHub <noreply@github.com>2024-10-14 13:18:57 (GMT)
commit06ca33020e1168459fc6c3e0df93664daf801339 (patch)
treebc5dfd378637cc905d6e2de5bcbfd6afc3ee1317 /Python/generated_cases.c.h
parent67f6e08147bc005e460d82fcce85bf5d56009cf5 (diff)
downloadcpython-06ca33020e1168459fc6c3e0df93664daf801339.zip
cpython-06ca33020e1168459fc6c3e0df93664daf801339.tar.gz
cpython-06ca33020e1168459fc6c3e0df93664daf801339.tar.bz2
GH-125323: Convert DECREF_INPUTS_AND_REUSE_FLOAT into a function that takes PyStackRefs. (GH-125439)
Diffstat (limited to 'Python/generated_cases.c.h')
-rw-r--r--Python/generated_cases.c.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index 0eeb566..7bd1b7d 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -84,8 +84,8 @@
double dres =
((PyFloatObject *)left_o)->ob_fval +
((PyFloatObject *)right_o)->ob_fval;
- PyObject *res_o;
- DECREF_INPUTS_AND_REUSE_FLOAT(left_o, right_o, dres, res_o);
+ PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres);
+ if (res_o == NULL) goto pop_2_error;
res = PyStackRef_FromPyObjectSteal(res_o);
}
stack_pointer[-2] = res;
@@ -251,8 +251,8 @@
double dres =
((PyFloatObject *)left_o)->ob_fval *
((PyFloatObject *)right_o)->ob_fval;
- PyObject *res_o;
- DECREF_INPUTS_AND_REUSE_FLOAT(left_o, right_o, dres, res_o);
+ PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres);
+ if (res_o == NULL) goto pop_2_error;
res = PyStackRef_FromPyObjectSteal(res_o);
}
stack_pointer[-2] = res;
@@ -322,8 +322,8 @@
double dres =
((PyFloatObject *)left_o)->ob_fval -
((PyFloatObject *)right_o)->ob_fval;
- PyObject *res_o;
- DECREF_INPUTS_AND_REUSE_FLOAT(left_o, right_o, dres, res_o);
+ PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres);
+ if (res_o == NULL) goto pop_2_error;
res = PyStackRef_FromPyObjectSteal(res_o);
}
stack_pointer[-2] = res;