Ruby: pm_list_t Struct Reference

Ruby 3.4.7p58 (2025-10-08 revision 7a5688e2a27668e48f8d6ff4af5b2208b98a2f5e)

Public Member Functions | Data Fields
pm_list_t Struct Reference

This represents the overall linked list. More...

`#include <pm_list.h>`

## Public Member Functions
PRISM_EXPORTED_FUNCTION bool | pm_list_empty_p (pm_list_t *list)
| Returns true if the given list is empty.
PRISM_EXPORTED_FUNCTION size_t | pm_list_size (pm_list_t *list)
| Returns the size of the list.
PRISM_EXPORTED_FUNCTION void | pm_list_free (pm_list_t *list)
| Deallocate the internal state of the given list.

## Data Fields
size_t | size
| The size of the list.
pm_list_node_t * | head
| A pointer to the head of the list.
pm_list_node_t * | tail
| A pointer to the tail of the list.

## Detailed Description

This represents the overall linked list.

It keeps a pointer to the head and tail so that iteration is easy and pushing new nodes is easy.

Definition at line 55 of file pm_list.h.

## Member Function Documentation

## ◆ pm_list_empty_p()

PRISM_EXPORTED_FUNCTION bool pm_list_empty_p | ( | pm_list_t * | list | ) |

Returns true if the given list is empty.

Parameters

  list | The list to check.

Returns
  True if the given list is empty, otherwise false.

Definition at line 7 of file pm_list.c.

Referenced by pm_list_empty_p().

## ◆ pm_list_free()

PRISM_EXPORTED_FUNCTION void pm_list_free | ( | pm_list_t * | list | ) |

Deallocate the internal state of the given list.

Parameters

  list | The list to free.

Definition at line 38 of file pm_list.c.

Referenced by pm_list_free().

## ◆ pm_list_size()

PRISM_EXPORTED_FUNCTION size_t pm_list_size | ( | pm_list_t * | list | ) |

Returns the size of the list.

Parameters

  list | The list to check.

Returns
  The size of the list.

Definition at line 15 of file pm_list.c.

Referenced by pm_list_size().

## Field Documentation

## ◆ head

pm_list_node_t* pm_list_t::head

A pointer to the head of the list.

Definition at line 60 of file pm_list.h.

Referenced by pm_diagnostic_list_free(), pm_list_append(), pm_list_empty_p(), pm_list_free(), and pm_serialize_comment_list().

## ◆ size

size_t pm_list_t::size

The size of the list.

Definition at line 57 of file pm_list.h.

Referenced by pm_list_append(), pm_list_free(), pm_list_size(), pm_parser::pm_parse_stream(), and pm_parse_success_p().

## ◆ tail

pm_list_node_t* pm_list_t::tail

A pointer to the tail of the list.

Definition at line 63 of file pm_list.h.

Referenced by pm_list_append().

The documentation for this struct was generated from the following file:

- prism/util/pm_list.h