@@ -3919,20 +3919,22 @@ _decimal_Decimal_as_integer_ratio_impl(PyObject *self)
3919
3919
}
3920
3920
3921
3921
/*[clinic input]
3922
- _decimal.Decimal.to_integral
3922
+ _decimal.Decimal.to_integral_value
3923
3923
3924
3924
rounding: object = None
3925
3925
context: object = None
3926
3926
3927
- Identical to the to_integral_value() method .
3927
+ Round to the nearest integer without signaling Inexact or Rounded .
3928
3928
3929
- The to_integral() name has been kept for compatibility with older versions.
3929
+ The rounding mode is determined by the rounding parameter if given, else by
3930
+ the given context. If neither parameter is given, then the rounding mode of
3931
+ the current default context is used.
3930
3932
[clinic start generated code]*/
3931
3933
3932
3934
static PyObject *
3933
- _decimal_Decimal_to_integral_impl (PyObject * self , PyObject * rounding ,
3934
- PyObject * context )
3935
- /*[clinic end generated code: output=a0c7188686ee7f5c input=a57d62d1d29aed1b ]*/
3935
+ _decimal_Decimal_to_integral_value_impl (PyObject * self , PyObject * rounding ,
3936
+ PyObject * context )
3937
+ /*[clinic end generated code: output=7301465765f48b6b input=5778168222cadf71 ]*/
3936
3938
{
3937
3939
PyObject * result ;
3938
3940
uint32_t status = 0 ;
@@ -3966,6 +3968,25 @@ _decimal_Decimal_to_integral_impl(PyObject *self, PyObject *rounding,
3966
3968
return result ;
3967
3969
}
3968
3970
3971
+ /*[clinic input]
3972
+ _decimal.Decimal.to_integral
3973
+
3974
+ rounding: object = None
3975
+ context: object = None
3976
+
3977
+ Identical to the to_integral_value() method.
3978
+
3979
+ The to_integral() name has been kept for compatibility with older versions.
3980
+ [clinic start generated code]*/
3981
+
3982
+ static PyObject *
3983
+ _decimal_Decimal_to_integral_impl (PyObject * self , PyObject * rounding ,
3984
+ PyObject * context )
3985
+ /*[clinic end generated code: output=a0c7188686ee7f5c input=a57d62d1d29aed1b]*/
3986
+ {
3987
+ return _decimal_Decimal_to_integral_value_impl (self , rounding , context );
3988
+ }
3989
+
3969
3990
/*[clinic input]
3970
3991
_decimal.Decimal.to_integral_exact
3971
3992
@@ -4017,27 +4038,6 @@ _decimal_Decimal_to_integral_exact_impl(PyObject *self, PyObject *rounding,
4017
4038
return result ;
4018
4039
}
4019
4040
4020
- /*[clinic input]
4021
- _decimal.Decimal.to_integral_value
4022
-
4023
- rounding: object = None
4024
- context: object = None
4025
-
4026
- Round to the nearest integer without signaling Inexact or Rounded.
4027
-
4028
- The rounding mode is determined by the rounding parameter if given, else by
4029
- the given context. If neither parameter is given, then the rounding mode of
4030
- the current default context is used.
4031
- [clinic start generated code]*/
4032
-
4033
- static PyObject *
4034
- _decimal_Decimal_to_integral_value_impl (PyObject * self , PyObject * rounding ,
4035
- PyObject * context )
4036
- /*[clinic end generated code: output=7301465765f48b6b input=5778168222cadf71]*/
4037
- {
4038
- return _decimal_Decimal_to_integral_impl (self , rounding , context );
4039
- }
4040
-
4041
4041
static PyObject *
4042
4042
PyDec_AsFloat (PyObject * dec )
4043
4043
{
0 commit comments