summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2026-05-10 17:37:31 +0200
committerSander Vrijders <sander@ouroboros.rocks>2026-05-20 08:17:06 +0200
commit46fa893af9ed74e2a473354c1777bd494b3374db (patch)
tree0368e7f18dc33e50688321e9969e273579853f0f /include
parent3f962298bfcf2fb0c6a30b4f1d9e1423321409cb (diff)
downloadouroboros-46fa893af9ed74e2a473354c1777bd494b3374db.tar.gz
ouroboros-46fa893af9ed74e2a473354c1777bd494b3374db.zip
lib: Use const for ssm_pk_buff getters
Mark ssm_pk_buff_get_off, _head, _tail, and _len as taking a const struct ssm_pk_buff *. Cast through the flex array in _head and _tail since the buffer view they return remains mutable. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/ssm_pk_buff.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/ouroboros/ssm_pk_buff.h b/include/ouroboros/ssm_pk_buff.h
index 0eedd678..f3ee2a85 100644
--- a/include/ouroboros/ssm_pk_buff.h
+++ b/include/ouroboros/ssm_pk_buff.h
@@ -28,13 +28,13 @@
struct ssm_pk_buff;
-size_t ssm_pk_buff_get_off(struct ssm_pk_buff * spb);
+size_t ssm_pk_buff_get_off(const struct ssm_pk_buff * spb);
-uint8_t * ssm_pk_buff_head(struct ssm_pk_buff * spb);
+uint8_t * ssm_pk_buff_head(const struct ssm_pk_buff * spb);
-uint8_t * ssm_pk_buff_tail(struct ssm_pk_buff * spb);
+uint8_t * ssm_pk_buff_tail(const struct ssm_pk_buff * spb);
-size_t ssm_pk_buff_len(struct ssm_pk_buff * spb);
+size_t ssm_pk_buff_len(const struct ssm_pk_buff * spb);
uint8_t * ssm_pk_buff_head_alloc(struct ssm_pk_buff * spb,
size_t size);