From 14e06e45f8018f6c733ec6a7f27d75a3db85c970 Mon Sep 17 00:00:00 2001 From: "Sven M. Hallberg" Date: Wed, 27 Nov 2019 10:07:56 +0100 Subject: [PATCH] add const to the pointer arg to h_make_bytes --- src/glue.c | 2 +- src/glue.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glue.c b/src/glue.c index 58fe4175..37962e84 100644 --- a/src/glue.c +++ b/src/glue.c @@ -106,7 +106,7 @@ HParsedToken *h_make_seqn(HArena *arena, size_t n) return ret; } -HParsedToken *h_make_bytes(HArena *arena, uint8_t *array, size_t len) +HParsedToken *h_make_bytes(HArena *arena, const uint8_t *array, size_t len) { HParsedToken *ret = h_make_(arena, TT_BYTES); ret->bytes.len = len; diff --git a/src/glue.h b/src/glue.h index 0bbfe9cf..31597cd2 100644 --- a/src/glue.h +++ b/src/glue.h @@ -195,7 +195,7 @@ HParsedToken *h_act_ignore(const HParseResult *p, void* user_data); HParsedToken *h_make(HArena *arena, HTokenType type, void *value); HParsedToken *h_make_seq(HArena *arena); // Makes empty sequence. HParsedToken *h_make_seqn(HArena *arena, size_t n); // Makes empty sequence of expected size n. -HParsedToken *h_make_bytes(HArena *arena, uint8_t *array, size_t len); +HParsedToken *h_make_bytes(HArena *arena, const uint8_t *array, size_t len); HParsedToken *h_make_sint(HArena *arena, int64_t val); HParsedToken *h_make_uint(HArena *arena, uint64_t val);