From e9fa798883676da5d94a6cf879f0b1b02478a88e Mon Sep 17 00:00:00 2001 From: Pavel Shramov Date: Thu, 16 Nov 2023 13:16:03 +0300 Subject: [PATCH] scheme: C++ version of tll_scheme_ref function --- src/tll/scheme.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tll/scheme.h b/src/tll/scheme.h index eb8bfd99..b730ef3e 100644 --- a/src/tll/scheme.h +++ b/src/tll/scheme.h @@ -293,6 +293,9 @@ typedef struct tll_scheme_t static tll_scheme_t * load(std::string_view url) { return tll_scheme_load(url.data(), url.size()); } tll_scheme_t * copy() const { return tll_scheme_copy(this); } + tll_scheme_t * ref() { return const_cast(tll_scheme_ref(this)); } + const tll_scheme_t * ref() const { return tll_scheme_ref(this); } + tll_scheme_message_t * lookup(int id) { for (auto m = messages; m; m = m->next) {