Skip to content

Commit

Permalink
Merge pull request #620 from jean-roland/fix_zid_arg_order
Browse files Browse the repository at this point in the history
Change `z_id_to_string` parameters order
  • Loading branch information
milyin authored Sep 4, 2024
2 parents 06540eb + e62ab92 commit 1e8f3dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/zenoh-pico/api/primitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -1546,13 +1546,13 @@ z_id_t z_info_zid(const z_loaned_session_t *zs);
* Converts a Zenoh ID into a string for print purposes.
*
* Parameters:
* str: Pointer to uninitialized :c:type:`z_owned_string_t` to store the string.
* id: Pointer to the id to convert.
* str: Pointer to uninitialized :c:type:`z_owned_string_t` to store the string.
*
* Return:
* ``0`` if operation successful, ``negative value`` otherwise.
*/
z_result_t z_id_to_string(z_owned_string_t *str, z_id_t *id);
z_result_t z_id_to_string(z_id_t *id, z_owned_string_t *str);

/**
* Gets the keyexpr from a sample by aliasing it.
Expand Down
2 changes: 1 addition & 1 deletion src/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ int8_t z_info_routers_zid(const z_loaned_session_t *zs, z_moved_closure_zid_t *c

z_id_t z_info_zid(const z_loaned_session_t *zs) { return _Z_RC_IN_VAL(zs)->_local_zid; }

z_result_t z_id_to_string(z_owned_string_t *str, z_id_t *id) {
z_result_t z_id_to_string(z_id_t *id, z_owned_string_t *str) {
_z_slice_t buf = _z_slice_alias_buf(id->id, sizeof(id->id));
str->_val = _z_string_convert_bytes(&buf);
if (!_z_string_check(&str->_val)) {
Expand Down

0 comments on commit 1e8f3dc

Please sign in to comment.