Skip to content

Commit

Permalink
reintroduce bdd_new_var, although I think it should be removed
Browse files Browse the repository at this point in the history
  • Loading branch information
stites committed Dec 9, 2023
1 parent 7e3c1be commit d1b7145
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ pub unsafe extern "C" fn mk_bdd_manager_default_order(num_vars: u64) -> *mut Rsd
.cast()
}


#[no_mangle]
#[allow(clippy::missing_safety_doc)]
pub unsafe extern "C" fn bdd_new_label(builder: *mut RsddBddBuilder) -> u64 {
Expand All @@ -120,6 +121,17 @@ pub unsafe extern "C" fn bdd_var(
Box::into_raw(Box::new(ptr))
}

#[no_mangle]
#[allow(clippy::missing_safety_doc)]
pub unsafe extern "C" fn bdd_new_var(
builder: *mut RsddBddBuilder,
polarity: bool,
) -> *mut BddPtr<'static> {
let builder = robdd_builder_from_ptr(builder);
let (_, ptr) = builder.new_var(polarity);
Box::into_raw(Box::new(ptr))
}

#[no_mangle]
#[allow(clippy::missing_safety_doc)]
pub unsafe extern "C" fn bdd_ite(
Expand Down

0 comments on commit d1b7145

Please sign in to comment.