From 0f31ef53420b755c3978818bcd2e5a86e141413d Mon Sep 17 00:00:00 2001 From: Randy Palamar Date: Sat, 11 Jan 2025 23:39:06 -0700 Subject: buffer: clear out one line functions Buffer is fully exposed to the program, no need to rely on the linker to optimize useless code. --- buffer.h | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'buffer.h') diff --git a/buffer.h b/buffer.h index a155163..f099b32 100644 --- a/buffer.h +++ b/buffer.h @@ -22,8 +22,6 @@ typedef struct { /** Release all resources, reinitialize buffer. */ void buffer_release(Buffer*); -/** Set buffer length to zero, keep allocated memory. */ -void buffer_clear(Buffer*); /** Reserve space to store at least ``size`` bytes.*/ bool buffer_reserve(Buffer*, size_t size); /** Reserve space for at least ``len`` *more* bytes. */ @@ -54,22 +52,11 @@ bool buffer_printf(Buffer*, const char *fmt, ...) __attribute__((format(printf, bool buffer_appendf(Buffer*, const char *fmt, ...) __attribute__((format(printf, 2, 3))); /** Return length of a buffer without trailing NUL byte. */ size_t buffer_length0(Buffer*); -/** Return length of a buffer including possible NUL byte. */ -size_t buffer_length(Buffer*); -/** Return current maximal capacity in bytes of this buffer. */ -size_t buffer_capacity(Buffer*); /** * Get pointer to buffer data. * Guaranteed to return a NUL terminated string even if buffer is empty. */ const char *buffer_content0(Buffer*); -/** - * Get pointer to buffer data. - * @rst - * .. warning:: Might be NULL, if empty. Might not be NUL terminated. - * @endrst - */ -const char *buffer_content(Buffer*); /** * Borrow underlying buffer data. * @rst -- cgit v1.2.3