Ruby 4.1.0dev (2026-10-08 revision 6203c21e58e4c27a91a3336ff2140a9641079025)
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}