Skip to content

Commit

Permalink
remove accidental internal header inclusions
Browse files Browse the repository at this point in the history
  • Loading branch information
p-avital committed Jan 17, 2024
1 parent 10df9c1 commit b76ceb4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 18 deletions.
2 changes: 0 additions & 2 deletions examples/unix/c11/z_put.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

#include "zenoh-pico/api/macros.h"
#include "zenoh-pico/api/types.h"
#include "zenoh-pico/collections/bytes.h"
#include "zenoh-pico/protocol/core.h"

#if Z_FEATURE_PUBLICATION == 1
int main(int argc, char **argv) {
Expand Down
3 changes: 0 additions & 3 deletions examples/unix/c11/z_sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
#include <unistd.h>
#include <zenoh-pico.h>

#include "zenoh-pico/api/types.h"
#include "zenoh-pico/protocol/core.h"

#if Z_FEATURE_SUBSCRIPTION == 1
int8_t attachment_handler(z_bytes_t key, z_bytes_t value, void *ctx) {

Check warning

Code scanning / Cppcheck (reported by Codacy)

misra violation 804 with no text in the supplied rule-texts-file Warning

misra violation 804 with no text in the supplied rule-texts-file
(void)ctx;
Expand Down
6 changes: 3 additions & 3 deletions include/zenoh-pico/api/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,11 @@ typedef struct {
*
* Members:
* z_encoding_t encoding: The encoding of the payload.
* z_attachment_t attachment: an attachment to the response.
*/
typedef struct {
z_encoding_t encoding;
// TODO: * z_attachment_t attachment: an attachment to the response.
// TODO: z_attachment_t attachment;
z_attachment_t attachment;
} z_query_reply_options_t;

/**
Expand Down Expand Up @@ -343,7 +343,7 @@ typedef struct {
z_value_t value;
z_query_consolidation_t consolidation;
z_query_target_t target;
// TODO: z_attachment_t attachment;
z_attachment_t attachment;
} z_get_options_t;

/**
Expand Down
14 changes: 5 additions & 9 deletions src/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,12 +722,10 @@ z_owned_keyexpr_t z_publisher_keyexpr(z_publisher_t publisher) {
OWNED_FUNCTIONS_PTR_INTERNAL(z_reply_t, z_owned_reply_t, reply, _z_reply_free, _z_owner_noop_copy)

z_get_options_t z_get_options_default(void) {
return (z_get_options_t){
.target = z_query_target_default(),
.consolidation = z_query_consolidation_default(),
.value = {.encoding = z_encoding_default(), .payload = _z_bytes_empty()},
// TODO: .attachment = z_attachment_null()
};
return (z_get_options_t){.target = z_query_target_default(),
.consolidation = z_query_consolidation_default(),
.value = {.encoding = z_encoding_default(), .payload = _z_bytes_empty()},
.attachment = z_attachment_null()};
}

typedef struct __z_reply_handler_wrapper_t {
Expand Down Expand Up @@ -775,9 +773,7 @@ int8_t z_get(z_session_t zs, z_keyexpr_t keyexpr, const char *parameters, z_owne
}

ret = _z_query(zs._val, keyexpr, parameters, opt.target, opt.consolidation.mode, opt.value, __z_reply_handler,
wrapped_ctx, callback->drop, ctx, z_attachment_null()
// TODO: opt.attachment
);
wrapped_ctx, callback->drop, ctx, opt.attachment);
return ret;
}

Expand Down
2 changes: 1 addition & 1 deletion zenohpico.pc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ prefix=/usr/local
Name: zenohpico
Description:
URL:
Version: 0.11.20240116dev
Version: 0.11.20240117dev
Cflags: -I${prefix}/include
Libs: -L${prefix}/lib -lzenohpico

0 comments on commit b76ceb4

Please sign in to comment.