Ruby 4.1.0dev (2026-09-05 revision a946c1bd8e5e7e03e938fe5bb4df942affa95ec6)
list.c
1#include "prism/internal/list.h"
2
6size_t
7pm_list_size(pm_list_t *list) {
8 return list->size;
9}
10
14void
15pm_list_append(pm_list_t *list, pm_list_node_t *node) {
16 if (list->head == NULL) {
17 list->head = node;
18 } else {
19 list->tail->next = node;
20 }
21
22 list->tail = node;
23 list->size++;
24}