Skip to content

Commit aa48718

Browse files
Merge pull request RustPython#549 from coolreader18/rust-value-payload
Add AnyRustValue payload variant
2 parents 82e2ba1 + dbfd0d4 commit aa48718

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vm/src/pyobject.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,6 +1259,9 @@ pub enum PyObjectPayload {
12591259
Socket {
12601260
socket: RefCell<Socket>,
12611261
},
1262+
AnyRustValue {
1263+
value: Box<dyn std::any::Any>,
1264+
},
12621265
}
12631266

12641267
impl fmt::Debug for PyObjectPayload {
@@ -1297,6 +1300,7 @@ impl fmt::Debug for PyObjectPayload {
12971300
PyObjectPayload::RustFunction { .. } => write!(f, "rust function"),
12981301
PyObjectPayload::Frame { .. } => write!(f, "frame"),
12991302
PyObjectPayload::Socket { .. } => write!(f, "socket"),
1303+
PyObjectPayload::AnyRustValue { .. } => write!(f, "some rust value"),
13001304
}
13011305
}
13021306
}

0 commit comments

Comments
 (0)