@@ -11,6 +11,7 @@ use crate::{
1111 VirtualMachine ,
1212} ;
1313
14+ pub type PyNumberInquiryFunc = fn ( PyNumber , & VirtualMachine ) -> PyResult < bool > ;
1415pub type PyNumberUnaryFunc < R = PyObjectRef > = fn ( PyNumber , & VirtualMachine ) -> PyResult < R > ;
1516pub type PyNumberBinaryFunc = fn ( & PyObject , & PyObject , & VirtualMachine ) -> PyResult ;
1617pub type PyNumberTernaryFunc = fn ( & PyObject , & PyObject , & PyObject , & VirtualMachine ) -> PyResult ;
@@ -126,7 +127,7 @@ pub struct PyNumberMethods {
126127 pub negative : Option < PyNumberUnaryFunc > ,
127128 pub positive : Option < PyNumberUnaryFunc > ,
128129 pub absolute : Option < PyNumberUnaryFunc > ,
129- pub boolean : Option < PyNumberUnaryFunc > ,
130+ pub boolean : Option < PyNumberInquiryFunc > ,
130131 pub invert : Option < PyNumberUnaryFunc > ,
131132 pub lshift : Option < PyNumberBinaryFunc > ,
132133 pub rshift : Option < PyNumberBinaryFunc > ,
@@ -250,7 +251,7 @@ pub struct PyNumberSlots {
250251 pub negative : AtomicCell < Option < PyNumberUnaryFunc > > ,
251252 pub positive : AtomicCell < Option < PyNumberUnaryFunc > > ,
252253 pub absolute : AtomicCell < Option < PyNumberUnaryFunc > > ,
253- pub boolean : AtomicCell < Option < PyNumberUnaryFunc > > ,
254+ pub boolean : AtomicCell < Option < PyNumberInquiryFunc > > ,
254255 pub invert : AtomicCell < Option < PyNumberUnaryFunc > > ,
255256 pub lshift : AtomicCell < Option < PyNumberBinaryFunc > > ,
256257 pub rshift : AtomicCell < Option < PyNumberBinaryFunc > > ,
0 commit comments