You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It was decided to remove z_config_client so not necessary to do this task. z_owned_string_array_t constructors remains implemented in zenoh-c and not implemented yet in pico for now. After adding more convenient config API this string array will be useful, no need to remove it
Update from comments and after discussion: the z_moved_string_array_t* seems to be much more convenient argument for z_config_client, instead of const char *const *peers, size_t n_peers. This update justifies existence of z_owned_string_array_t construction/filling methods both for zenoh-c and zenoh-pico
The z_owned_string_array_t is used in single place: as destination type for z_hello_locators function. It's never accepted by any zenoh function and therefore there is no reason for user to be able to create and modify it.
So functions z_string_array_new, z_string_array_push_by_alias, z_string_array_push_by_copy seems to be not really needed. Zenoh-pico doesn't provide these functions.
The proposal is to make these methods unstable in zenoh-c to not force us to implement them in zenoh-pico.
The text was updated successfully, but these errors were encountered:
we could technically use z_owned_string_array_t instead of *const *const c_char + length in z_config_client when passing array of peers - this would allow accepting non-null-terminated strings (this might also be interesting for c++ to allow accepting a list of string view instead of vector of std::string in the corresponding function - but performance gain would likely be minimal)
we could technically use z_owned_string_array_t instead of *const *const c_char + length in z_config_client when passing array of peers - this would allow accepting non-null-terminated strings (this might also be interesting for c++ to allow accepting a list of string view instead of vector of std::string in the corresponding function - but performance gain would likely be minimal)
@sashacmc what do you think? This makes sense for me: the const char *const *peers, size_t n_peers is really ugly, I like the idea to use z_owned_sting_array_t here instead
milyin
changed the title
make z_string_array_t methods unstable
accept z_string_array_t in z_config_clientSep 6, 2024
It was decided to remove
z_config_client
so not necessary to do this task.z_owned_string_array_t
constructors remains implemented in zenoh-c and not implemented yet in pico for now. After adding more convenient config API this string array will be useful, no need to remove itUpdate from comments and after discussion: the
z_moved_string_array_t*
seems to be much more convenient argument forz_config_client
, instead ofconst char *const *peers
,size_t n_peers
. This update justifies existence ofz_owned_string_array_t
construction/filling methods both for zenoh-c and zenoh-picoThe
z_owned_string_array_t
is used in single place: as destination type forz_hello_locators
function. It's never accepted by any zenoh function and therefore there is no reason for user to be able to create and modify it.So functions
z_string_array_new
,z_string_array_push_by_alias
,z_string_array_push_by_copy
seems to be not really needed. Zenoh-pico doesn't provide these functions.The proposal is to make these methods unstable in zenoh-c to not force us to implement them in zenoh-pico.
The text was updated successfully, but these errors were encountered: