From 661f177d82536135a2ac9ab13f4247220fc33644 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Mon, 23 Oct 2017 16:36:12 +0200 Subject: [PATCH] btstack_tlv: add const to btstack_tlv_t * --- src/btstack_tlv.c | 8 ++++---- src/btstack_tlv.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/btstack_tlv.c b/src/btstack_tlv.c index 6676758eb..607c839ae 100644 --- a/src/btstack_tlv.c +++ b/src/btstack_tlv.c @@ -37,15 +37,15 @@ #include "btstack_tlv.h" -static btstack_tlv_t * btstack_tlv_singleton_impl; -static void * btstack_tlv_singleton_context; +static const btstack_tlv_t * btstack_tlv_singleton_impl; +static void * btstack_tlv_singleton_context; -void btstack_tlv_set_instance(btstack_tlv_t * tlv_impl, void * tlv_context){ +void btstack_tlv_set_instance(const btstack_tlv_t * tlv_impl, void * tlv_context){ btstack_tlv_singleton_impl = tlv_impl; btstack_tlv_singleton_context = tlv_context; } -void btstack_tlv_get_instance(btstack_tlv_t ** tlv_impl, void ** tlv_context){ +void btstack_tlv_get_instance(const btstack_tlv_t ** tlv_impl, void ** tlv_context){ *tlv_impl = btstack_tlv_singleton_impl; *tlv_context = btstack_tlv_singleton_context; } diff --git a/src/btstack_tlv.h b/src/btstack_tlv.h index cedc3204e..a3fa23128 100644 --- a/src/btstack_tlv.h +++ b/src/btstack_tlv.h @@ -82,14 +82,14 @@ typedef struct { * @param tlv_impl * @param tlv_context */ -void btstack_tlv_set_instance(btstack_tlv_t * tlv_impl, void * tlv_context); +void btstack_tlv_set_instance(const btstack_tlv_t * tlv_impl, void * tlv_context); /** * @brief Get current TLV implementation. Used for bonding information, but can be used by application, too. * @param tlv_impl * @param tlv_context */ -void btstack_tlv_get_instance(btstack_tlv_t ** tlv_impl, void ** tlv_context); +void btstack_tlv_get_instance(const btstack_tlv_t ** tlv_impl, void ** tlv_context); #if defined __cplusplus }