Skip to content

Commit

Permalink
Rename z_loaned_hello_handler_t to z_closure_hello_callback_t (#743)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc authored Oct 16, 2024
1 parent a8962f8 commit 7ccffa7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/zenoh-pico/api/primitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ void z_closure_reply_call(const z_loaned_closure_reply_t *closure, z_loaned_repl
* Return:
* ``0`` in case of success, negative error code otherwise
*/
z_result_t z_closure_hello(z_owned_closure_hello_t *closure, z_loaned_hello_handler_t call,
z_result_t z_closure_hello(z_owned_closure_hello_t *closure, z_closure_hello_callback_t call,
z_closure_drop_callback_t drop, void *context);

/**
Expand Down
4 changes: 2 additions & 2 deletions include/zenoh-pico/api/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,11 @@ typedef struct {
*/
_Z_OWNED_TYPE_VALUE(_z_closure_reply_t, closure_reply)

typedef void (*z_loaned_hello_handler_t)(z_loaned_hello_t *hello, void *arg);
typedef void (*z_closure_hello_callback_t)(z_loaned_hello_t *hello, void *arg);

typedef struct {
void *context;
z_loaned_hello_handler_t call;
z_closure_hello_callback_t call;
z_closure_drop_callback_t drop;
} _z_closure_hello_t;

Expand Down
4 changes: 2 additions & 2 deletions src/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,12 +552,12 @@ _Z_OWNED_FUNCTIONS_RC_IMPL(session)
_Z_OWNED_FUNCTIONS_CLOSURE_IMPL(closure_sample, _z_closure_sample_callback_t, z_closure_drop_callback_t)
_Z_OWNED_FUNCTIONS_CLOSURE_IMPL(closure_query, _z_closure_query_callback_t, z_closure_drop_callback_t)
_Z_OWNED_FUNCTIONS_CLOSURE_IMPL(closure_reply, _z_closure_reply_callback_t, z_closure_drop_callback_t)
_Z_OWNED_FUNCTIONS_CLOSURE_IMPL(closure_hello, z_loaned_hello_handler_t, z_closure_drop_callback_t)
_Z_OWNED_FUNCTIONS_CLOSURE_IMPL(closure_hello, z_closure_hello_callback_t, z_closure_drop_callback_t)
_Z_OWNED_FUNCTIONS_CLOSURE_IMPL(closure_zid, z_closure_zid_callback_t, z_closure_drop_callback_t)

/************* Primitives **************/
typedef struct __z_hello_handler_wrapper_t {
z_loaned_hello_handler_t user_call;
z_closure_hello_callback_t user_call;
void *ctx;
} __z_hello_handler_wrapper_t;

Expand Down

0 comments on commit 7ccffa7

Please sign in to comment.