diff options
| author | Randy Palamar <randy@rnpnr.xyz> | 2025-01-11 23:39:06 -0700 |
|---|---|---|
| committer | Randy Palamar <randy@rnpnr.xyz> | 2025-01-11 23:49:58 -0700 |
| commit | 0f31ef53420b755c3978818bcd2e5a86e141413d (patch) | |
| tree | 508af7b7016f9aa2fbe766f310a8dfdc446d8a77 /buffer.h | |
| parent | abf6384cca0f80fe7dfb35a8e2281d8664d9d459 (diff) | |
| download | vis-0f31ef53420b755c3978818bcd2e5a86e141413d.tar.gz vis-0f31ef53420b755c3978818bcd2e5a86e141413d.tar.xz | |
buffer: clear out one line functions
Buffer is fully exposed to the program, no need to rely on the
linker to optimize useless code.
Diffstat (limited to 'buffer.h')
| -rw-r--r-- | buffer.h | 13 |
1 files changed, 0 insertions, 13 deletions
@@ -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,23 +52,12 @@ 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 * .. warning:: The caller is responsible to ``free(3)`` it. |
