diff options
-rw-r--r-- | upb/msg.c | 4 | ||||
-rw-r--r-- | upb/msg.h | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -158,8 +158,8 @@ void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len) { in->unknown_len += len; } -const char *upb_msg_getunknown(upb_msg *msg, size_t *len) { - upb_msg_internal* in = upb_msg_getinternal(msg); +const char *upb_msg_getunknown(const upb_msg *msg, size_t *len) { + const upb_msg_internal* in = upb_msg_getinternal_const(msg); *len = in->unknown_len; return in->unknown; } @@ -155,7 +155,7 @@ upb_msg *upb_msg_new(const upb_msglayout *l, upb_arena *a); upb_arena *upb_msg_arena(const upb_msg *msg); void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len); -const char *upb_msg_getunknown(upb_msg *msg, size_t *len); +const char *upb_msg_getunknown(const upb_msg *msg, size_t *len); /* Read-only message API. Can be safely called by anyone. */ |