Browse Source

Remove debug output again

tags/v0.0.0-test.4
Philipp Oppermann 3 years ago
parent
commit
eee7f42b45
Failed to extract signature
1 changed files with 0 additions and 3 deletions
  1. +0
    -3
      apis/c/node/src/lib.rs

+ 0
- 3
apis/c/node/src/lib.rs View File

@@ -20,7 +20,6 @@ struct DoraContext {
/// On error, a null pointer is returned.
#[no_mangle]
pub extern "C" fn init_dora_context_from_env() -> *mut c_void {
println!("init_dora_context_from_env");
let context = || {
let node = DoraNode::init_from_env()?;
let node = Box::leak(Box::new(node));
@@ -48,9 +47,7 @@ pub extern "C" fn init_dora_context_from_env() -> *mut c_void {
/// freeing, the pointer must not be used anymore.
#[no_mangle]
pub unsafe extern "C" fn free_dora_context(context: *mut c_void) {
println!("free_dora_context");
let context: Box<DoraContext> = unsafe { Box::from_raw(context.cast()) };
println!("free_dora_context: node_id = {}", context.node.id());
// drop all fields except for `node`
let DoraContext { node, .. } = *context;
// convert the `'static` reference back to a Box, then drop it


Loading…
Cancel
Save