From 5e771a99ec04a0a28484931d5ccb334d295295cd Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sun, 11 Jan 2026 18:42:08 -0500 Subject: [PATCH] xo-tokenizer2: use xo-arena DCircularBuffer to buffer input line --- include/xo/arena/DCircularBuffer.hpp | 4 +++- src/arena/DCircularBuffer.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/xo/arena/DCircularBuffer.hpp b/include/xo/arena/DCircularBuffer.hpp index c7c8abf..0cb007a 100644 --- a/include/xo/arena/DCircularBuffer.hpp +++ b/include/xo/arena/DCircularBuffer.hpp @@ -58,8 +58,10 @@ namespace xo { size_type page_z, size_type buffer_align_z, span_type reserved_range); +#ifdef NOT_YET /** constructor */ DCircularBuffer(const CircularBufferConfig & config); +#endif /** non-copyable **/ DCircularBuffer(const DCircularBuffer & other) = delete; /** move ctor **/ @@ -107,7 +109,7 @@ namespace xo { * If buffer memory exhausted, may copy a prefix of @p r. * In that case returns the remaining suffix of @p r. **/ - span_type append(span_type r); + const_span_type append(const_span_type r); /** DMA version of @ref append_span : get mapped span A at which * buffer will receive new content. Upstream may write into diff --git a/src/arena/DCircularBuffer.cpp b/src/arena/DCircularBuffer.cpp index 70efcd2..5ad7e02 100644 --- a/src/arena/DCircularBuffer.cpp +++ b/src/arena/DCircularBuffer.cpp @@ -146,7 +146,7 @@ namespace xo { } auto - DCircularBuffer::append(span_type src) -> span_type + DCircularBuffer::append(const_span_type src) -> const_span_type { span_type dest = get_append_span(src.size());