Skip to content

Commit ad88337

Browse files
committed
Mark PyInt as ThreadSafe
1 parent bcd5186 commit ad88337

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vm/src/obj/objint.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use crate::function::{OptionalArg, PyFuncArgs};
1919
use crate::pyhash;
2020
use crate::pyobject::{
2121
IdProtocol, IntoPyObject, PyArithmaticValue, PyClassImpl, PyComparisonValue, PyContext,
22-
PyObjectRef, PyRef, PyResult, PyValue, TryFromObject, TypeProtocol,
22+
PyObjectRef, PyRef, PyResult, PyValue, ThreadSafe, TryFromObject, TypeProtocol,
2323
};
2424
use crate::stdlib::array::PyArray;
2525
use crate::vm::VirtualMachine;
@@ -44,6 +44,8 @@ pub struct PyInt {
4444
value: BigInt,
4545
}
4646

47+
impl ThreadSafe for PyInt {}
48+
4749
impl fmt::Display for PyInt {
4850
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4951
BigInt::fmt(&self.value, f)

0 commit comments

Comments
 (0)