barectf.h.j2: add barectf_packet_buf_addr()
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 23 Sep 2020 22:20:07 +0000 (18:20 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 23 Sep 2020 22:46:24 +0000 (18:46 -0400)
barectf_packet_buf_addr() is an alias of barectf_packet_buf().

This is more in line with the barectf_packet_set_buf() function which
sets both the buffer's address and size.

This change helps document the platform API.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
barectf/templates/c/barectf.c.j2
barectf/templates/c/barectf.h.j2

index f7e7a397823a80529893f4650ff94de8df7cb69c..5a9df28b469ce46b0bd5de5451014f8fcfc69f2c 100644 (file)
@@ -100,6 +100,11 @@ uint8_t *{{ prefix }}packet_buf(const void * const vctx)
        return _FROM_VOID_PTR(const struct {{ ctx_struct_name }}, vctx)->buf;
 }
 
+uint8_t *{{ prefix }}packet_buf_addr(const void * const vctx)
+{
+       return {{ prefix }}packet_buf(vctx);
+}
+
 uint32_t {{ prefix }}packet_buf_size(const void * const vctx)
 {
        const struct {{ ctx_struct_name }} * const ctx = _FROM_VOID_PTR(const struct {{ ctx_struct_name }}, vctx);
index 405e8258100203572a12f74f60632a923a2ab939..8f52e19333f01418be7f803442fa1a6c84f9da92 100644 (file)
@@ -70,6 +70,7 @@ int {{ prefix }}packet_is_empty(const void *ctx);
 uint32_t {{ prefix }}packet_events_discarded(const void *ctx);
 uint32_t {{ prefix }}discarded_event_records_count(const void * const ctx);
 uint8_t *{{ prefix }}packet_buf(const void *ctx);
+uint8_t *{{ prefix }}packet_buf_addr(const void * const ctx);
 void {{ prefix }}packet_set_buf(void *ctx, uint8_t *buf, uint32_t buf_size);
 uint32_t {{ prefix }}packet_buf_size(const void *ctx);
 int {{ prefix }}packet_is_open(const void *ctx);
This page took 0.026353 seconds and 4 git commands to generate.