//! 1. **Proper Alignment**: Fixed in commit addressing Miri UB - memory is allocated with correct
//! 2. **Atomic Reference Counting**: All reference counts use `AtomicUsize` with `SeqCst` ordering,
//! 3. **Runtime Type Safety**: Type IDs are checked before downcasting, preventing invalid pointer
#[allow(clippy::used_underscore_binding)] // `_`-prefixed fields are an intentional FFI/api.json
#[allow(clippy::used_underscore_binding)] // `_`-prefixed fields are an intentional FFI/api.json
#[allow(clippy::non_send_fields_in_send_ty)] // see SAFETY note above: atomic refcount, no TLS, no
// - Methods on `&RefAny` (like `clone`, `get_type_id`) only use atomic operations or read immutable
/// - If `serialize_fn != 0`, it must be a valid function pointer of type `extern "C" fn(RefAny)
/// - If `deserialize_fn != 0`, it must be a valid function pointer of type `extern "C" fn(Json)
#[allow(clippy::used_underscore_binding)] // `_`-prefixed fields are an intentional FFI/api.json
#[allow(clippy::used_underscore_binding)] // `_`-prefixed fields are an intentional FFI/api.json