Prism Ruby parser
|
A pm_buffer_t is a simple memory buffer that stores data in a contiguous block of memory. More...
#include <pm_buffer.h>
Public Member Functions | |
PRISM_EXPORTED_FUNCTION bool | pm_buffer_init (pm_buffer_t *buffer) |
Initialize a pm_buffer_t with its default values. | |
PRISM_EXPORTED_FUNCTION char * | pm_buffer_value (const pm_buffer_t *buffer) |
Return the value of the buffer. | |
PRISM_EXPORTED_FUNCTION size_t | pm_buffer_length (const pm_buffer_t *buffer) |
Return the length of the buffer. | |
PRISM_EXPORTED_FUNCTION void | pm_buffer_free (pm_buffer_t *buffer) |
Free the memory associated with the buffer. | |
Data Fields | |
size_t | length |
The length of the buffer in bytes. | |
size_t | capacity |
The capacity of the buffer in bytes that has been allocated. | |
char * | value |
A pointer to the start of the buffer. | |
A pm_buffer_t is a simple memory buffer that stores data in a contiguous block of memory.
PRISM_EXPORTED_FUNCTION bool pm_buffer_init | ( | pm_buffer_t * | buffer | ) |
Initialize a pm_buffer_t with its default values.
buffer | The buffer to initialize. |
PRISM_EXPORTED_FUNCTION char * pm_buffer_value | ( | const pm_buffer_t * | buffer | ) |
Return the value of the buffer.
buffer | The buffer to get the value of. |
PRISM_EXPORTED_FUNCTION size_t pm_buffer_length | ( | const pm_buffer_t * | buffer | ) |
Return the length of the buffer.
buffer | The buffer to get the length of. |
PRISM_EXPORTED_FUNCTION void pm_buffer_free | ( | pm_buffer_t * | buffer | ) |
Free the memory associated with the buffer.
buffer | The buffer to free. |