Fix debug/release conditional compilation flags for free()
This commit is contained in:
parent
967da88371
commit
b4a2f4ed60
1 changed files with 2 additions and 2 deletions
|
|
@ -4,7 +4,7 @@ extern "C" {
|
|||
/// In *Release* builds, the C library links directly against `malloc` and `free`.
|
||||
///
|
||||
/// When freeing memory that was allocated by C code, use `free` directly.
|
||||
#[cfg(not(test))]
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[link_name = "free"]
|
||||
pub fn free_ptr(ptr: *mut c_void);
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ extern "C" {
|
|||
///
|
||||
/// When freeing memory that was allocated by C code, use the `free` function
|
||||
/// from that module.
|
||||
#[cfg(test)]
|
||||
#[cfg(debug_assertions)]
|
||||
#[link_name = "ts_record_free"]
|
||||
pub fn free_ptr(ptr: *mut c_void);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue