Ruby 3.3.7p123 (2025-01-15 revision be31f993d7fa0219d85f7b3c694d454da4ecc10b)
pm_string_list.h
Go to the documentation of this file.
1
6#ifndef PRISM_STRING_LIST_H
7#define PRISM_STRING_LIST_H
8
9#include "prism/defines.h"
11
12#include <stddef.h>
13#include <stdlib.h>
14
18typedef struct {
20 size_t length;
21
23 size_t capacity;
24
28
35void pm_string_list_append(pm_string_list_t *string_list, pm_string_t *string);
36
43
44#endif
A generic string type that can have various ownership semantics.
void pm_string_list_append(pm_string_list_t *string_list, pm_string_t *string)
Append a pm_string_t to the given string list.
PRISM_EXPORTED_FUNCTION void pm_string_list_free(pm_string_list_t *string_list)
Free the memory associated with the string list.
Macro definitions used throughout the prism library.
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
Definition defines.h:32
A list of strings.
size_t capacity
The capacity of the string list that has been allocated.
pm_string_t * strings
A pointer to the start of the string list.
size_t length
The length of the string list.
A generic string type that can have various ownership semantics.
Definition pm_string.h:30