forked from Rust-related/RustPython
Mark PyStruct as ThreadSafe
This commit is contained in:
@@ -27,7 +27,7 @@ mod _struct {
|
||||
objtuple::PyTuple, objtype::PyClassRef,
|
||||
};
|
||||
use crate::pyobject::{
|
||||
Either, PyClassImpl, PyObjectRef, PyRef, PyResult, PyValue, TryFromObject,
|
||||
Either, PyClassImpl, PyObjectRef, PyRef, PyResult, PyValue, ThreadSafe, TryFromObject,
|
||||
};
|
||||
use crate::VirtualMachine;
|
||||
|
||||
@@ -679,6 +679,8 @@ mod _struct {
|
||||
fmt_str: PyStringRef,
|
||||
}
|
||||
|
||||
impl ThreadSafe for PyStruct {}
|
||||
|
||||
impl PyValue for PyStruct {
|
||||
fn class(vm: &VirtualMachine) -> PyClassRef {
|
||||
vm.class("_struct", "Struct")
|
||||
|
||||
Reference in New Issue
Block a user