I apologise for the code churn, but this will make it more pleasant to use, instead of fighting raw pointers everywhere.
a mutex is added to guard manipulation of the architecture backend; this might get broken into finer-grained locking in the future, but it'll do for now.
the big change is that the FFI function declarations take references instead of pointers, because pretty much all functions would choke on a null pointer anyway; this reduces the number of functions that clippy demands to be marked as unsafe as a helpful side-effect.
while doing this, I decided to change the API of netinfo_users_leak a bit, because I'm reasonably sure PortRefs shouldn't be modified (and then changed npnr_portref_cell to reflect this).
since Nets doesn't contain any raw pointers, I can remove the manual implementations of Send/Sync (in hindsight this commit is badly named)
I apologise for the code churn, but this will make it more pleasant to use, instead of fighting raw pointers everywhere.
unsafe
as a helpful side-effect.netinfo_users_leak
a bit, because I'm reasonably surePortRef
s shouldn't be modified (and then changednpnr_portref_cell
to reflect this).Nets
doesn't contain any raw pointers, I can remove the manual implementations ofSend
/Sync
(in hindsight this commit is badly named)