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:
1ndahous3 authored and GitHub committed 2026-10-26 20:39:14 +09:00
1 parent 9848c78bd5
commit cdb39399bd
12 files changed
+490 -151

No files matched your search

+6
View File
@@ -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
}