File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Misc/NEWS.d/next/Core and Builtins Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
- Implementation of missing floor and ceil methods to float object -- by
2
- Batuhan Taskaya.
1
+ Added ``__floor__ `` and ``__ceil__ `` methods to float object. Patch by Batuhan Taşkaya.
Original file line number Diff line number Diff line change @@ -933,7 +933,7 @@ static PyObject *
933
933
float___floor___impl (PyObject * self )
934
934
/*[clinic end generated code: output=e0551dbaea8c01d1 input=77bb13eb12e268df]*/
935
935
{
936
- double x = PyFloat_AsDouble (self );
936
+ double x = PyFloat_AS_DOUBLE (self );
937
937
return PyLong_FromDouble (floor (x ));
938
938
}
939
939
@@ -947,7 +947,7 @@ static PyObject *
947
947
float___ceil___impl (PyObject * self )
948
948
/*[clinic end generated code: output=a2fd8858f73736f9 input=79e41ae94aa0a516]*/
949
949
{
950
- double x = PyFloat_AsDouble (self );
950
+ double x = PyFloat_AS_DOUBLE (self );
951
951
return PyLong_FromDouble (ceil (x ));
952
40D8
code>
952
}
953
953
You can’t perform that action at this time.
0 commit comments