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 *
933933float___floor___impl (PyObject * self )
934934/*[clinic end generated code: output=e0551dbaea8c01d1 input=77bb13eb12e268df]*/
935935{
936- double x = PyFloat_AsDouble (self );
936+ double x = PyFloat_AS_DOUBLE (self );
937937 return PyLong_FromDouble (floor (x ));
938938}
939939
@@ -947,7 +947,7 @@ static PyObject *
947947float___ceil___impl (PyObject * self )
948948/*[clinic end generated code: output=a2fd8858f73736f9 input=79e41ae94aa0a516]*/
949949{
950- double x = PyFloat_AsDouble (self );
950+ double x = PyFloat_AS_DOUBLE (self );
951951 return PyLong_FromDouble (ceil (x ));
952952}
953953
You can’t perform that action at this time.
0 commit comments