Vladimir Pouzanov <[email protected]> writes: > A few ideas: > Thanks!
> * make a static P that manages *T storage inside it. *T could be > statically pointed to heap block in ram, P will wrap the API to make it > less verbose. > * use Cell to make internals of immutable mutable back again. This would > not work with statics, obviously, as they will land in .rodata, but we > have #[link_section] to deal with that. This was my reason for keeping the reference count in an `Unsafe`. I would have just used a `Cell` but unfortunately it's a bit painful to do this due to the static initializer issue. The `link_section` suggestion is a good one. Cheers, - Ben
pgpzLLuh0FP0t.pgp
Description: PGP signature
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
