mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-04-15 16:11:33 +00:00
rust: convert netinfo_driver to Option
This commit is contained in:
@@ -32,7 +32,7 @@ pub struct NetInfo {
|
||||
}
|
||||
|
||||
impl NetInfo {
|
||||
pub fn driver(&mut self) -> &mut PortRef {
|
||||
pub fn driver(&mut self) -> Option<&mut PortRef> {
|
||||
unsafe { npnr_netinfo_driver(self) }
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ extern "C" {
|
||||
fn npnr_context_get_pips_uphill(ctx: &Context, wire: WireId) -> &mut RawUphillIter;
|
||||
fn npnr_delete_uphill_iter(iter: &mut RawUphillIter);
|
||||
|
||||
fn npnr_netinfo_driver(net: &mut NetInfo) -> &mut PortRef;
|
||||
fn npnr_netinfo_driver(net: &mut NetInfo) -> Option<&mut PortRef>;
|
||||
fn npnr_netinfo_users_leak(net: &NetInfo, users: *mut *mut *const PortRef) -> u32;
|
||||
fn npnr_netinfo_is_global(net: &NetInfo) -> bool;
|
||||
fn npnr_netinfo_udata(net: &NetInfo) -> NetIndex;
|
||||
|
||||
Reference in New Issue
Block a user