mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Fix ctypes scalar access, bitfields, and cyclic collection (#9390)
* Fix ctypes scalar access, bitfields, and cyclic collection Assisted-by: Codex:GPT-6 * Format ctypes pyclass attributes Assisted-by: Codex:GPT-6
This commit is contained in:
1 parent
9848c78bd5
commit
cdb39399bd
12 files changed
+490
-151
No files matched your search
@@ -1860,6 +1860,12 @@ impl<U: 'static> CallbackThunk<U> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Borrow the userdata owned by this callback closure.
|
||||
pub fn userdata(&self) -> &U {
|
||||
// SAFETY: new stores Box::into_raw here; Drop owns its only reclamation.
|
||||
unsafe { &*self.userdata_ptr }
|
||||
}
|
||||
|
||||
pub fn code_ptr(&self) -> CodePtr {
|
||||
self.code_ptr
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user