47bool pm_buffer_init_capacity(
pm_buffer_t *buffer,
size_t capacity);
85void pm_buffer_append_zeroes(
pm_buffer_t *buffer,
size_t length);
103void pm_buffer_append_string(
pm_buffer_t *buffer, const
char *value,
size_t length);
112void pm_buffer_append_bytes(
pm_buffer_t *buffer, const uint8_t *value,
size_t length);
120void pm_buffer_append_byte(
pm_buffer_t *buffer, uint8_t value);
128void pm_buffer_append_varuint(
pm_buffer_t *buffer, uint32_t value);
136void pm_buffer_append_varsint(
pm_buffer_t *buffer, int32_t value);
144void pm_buffer_append_double(
pm_buffer_t *buffer,
double value);
154bool pm_buffer_append_unicode_codepoint(
pm_buffer_t *buffer, uint32_t value);
161 PM_BUFFER_ESCAPING_RUBY,
162 PM_BUFFER_ESCAPING_JSON
182void pm_buffer_prepend_string(
pm_buffer_t *buffer,
const char *value,
size_t length);
215size_t pm_buffer_index(
const pm_buffer_t *buffer,
char value);
225void pm_buffer_insert(
pm_buffer_t *buffer,
size_t index,
const char *value,
size_t length);
pm_buffer_escaping_t
The different types of escaping that can be performed by the buffer when appending a slice of Ruby so...
Functions for working with characters and strings.
Macro definitions used throughout the prism library.
#define PRISM_ATTRIBUTE_FORMAT(string_index, argument_index)
Certain compilers support specifying that a function accepts variadic parameters that look like print...
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
C99 shim for <stdbool.h>.
A pm_buffer_t is a simple memory buffer that stores data in a contiguous block of memory.
size_t capacity
The capacity of the buffer in bytes that has been allocated.
size_t length
The length of the buffer in bytes.
char * value
A pointer to the start of the buffer.