From bf2fbfc52d6cb9b3aa7d3d3896bbdddb825bd363 Mon Sep 17 00:00:00 2001 From: snowapril Date: Wed, 29 Mar 2023 23:49:40 +0900 Subject: [PATCH] Modify boolean field as PyNumberInquiryFunc Signed-off-by: snowapril --- vm/src/protocol/number.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vm/src/protocol/number.rs b/vm/src/protocol/number.rs index 5ef6cf693..7cb95cec4 100644 --- a/vm/src/protocol/number.rs +++ b/vm/src/protocol/number.rs @@ -11,6 +11,7 @@ use crate::{ VirtualMachine, }; +pub type PyNumberInquiryFunc = fn(PyNumber, &VirtualMachine) -> PyResult; pub type PyNumberUnaryFunc = fn(PyNumber, &VirtualMachine) -> PyResult; pub type PyNumberBinaryFunc = fn(&PyObject, &PyObject, &VirtualMachine) -> PyResult; pub type PyNumberTernaryFunc = fn(&PyObject, &PyObject, &PyObject, &VirtualMachine) -> PyResult; @@ -126,7 +127,7 @@ pub struct PyNumberMethods { pub negative: Option, pub positive: Option, pub absolute: Option, - pub boolean: Option, + pub boolean: Option, pub invert: Option, pub lshift: Option, pub rshift: Option, @@ -250,7 +251,7 @@ pub struct PyNumberSlots { pub negative: AtomicCell>, pub positive: AtomicCell>, pub absolute: AtomicCell>, - pub boolean: AtomicCell>, + pub boolean: AtomicCell>, pub invert: AtomicCell>, pub lshift: AtomicCell>, pub rshift: AtomicCell>,