Skip to content

Commit

Permalink
Fix z_task_init argument signature (#784)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc authored Oct 22, 2024
1 parent e68d72c commit a87a581
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/zenoh_commons.h
Original file line number Diff line number Diff line change
Expand Up @@ -4149,7 +4149,7 @@ ZENOHC_API void z_task_drop(struct z_moved_task_t *this_);
ZENOHC_API
z_result_t z_task_init(struct z_owned_task_t *this_,
const struct z_task_attr_t *_attr,
void (*fun)(void *arg),
void *(*fun)(void *arg),
void *arg);
/**
* Joins the task and releases all allocated resources
Expand Down
4 changes: 2 additions & 2 deletions src/platform/synchronization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ pub extern "C" fn z_internal_task_check(this_: &z_owned_task_t) -> bool {
}

struct FunArgPair {
fun: unsafe extern "C" fn(arg: *mut c_void),
fun: unsafe extern "C" fn(arg: *mut c_void) -> *mut c_void,
arg: *mut c_void,
}

Expand All @@ -265,7 +265,7 @@ unsafe impl Send for FunArgPair {}
pub unsafe extern "C" fn z_task_init(
this: &mut MaybeUninit<z_owned_task_t>,
_attr: *const z_task_attr_t,
fun: unsafe extern "C" fn(arg: *mut c_void),
fun: unsafe extern "C" fn(arg: *mut c_void) -> *mut c_void,
arg: *mut c_void,
) -> result::z_result_t {
let this = this.as_rust_type_mut_uninit();
Expand Down

0 comments on commit a87a581

Please sign in to comment.