Ruby: pm_newline_list_t Struct Reference

Ruby 3.4.5p51 (2025-07-16 revision 20cda200d3ce092571d0b5d342dadca69636cb0f)

Data Fields
pm_newline_list_t Struct Reference

A list of offsets of newlines in a string. More...

`#include <pm_newline_list.h>`

## Data Fields
const uint8_t * | start
| A pointer to the start of the source string.
size_t | size
| The number of offsets in the list.
size_t | capacity
| The capacity of the list that has been allocated.
size_t * | offsets
| The list of offsets.

## Detailed Description

A list of offsets of newlines in a string.

The offsets are assumed to be sorted/inserted in ascending order.

Definition at line 28 of file pm_newline_list.h.

## Field Documentation

## ◆ capacity

size_t pm_newline_list_t::capacity

The capacity of the list that has been allocated.

Definition at line 36 of file pm_newline_list.h.

Referenced by pm_newline_list_append(), and pm_newline_list_init().

## ◆ offsets

size_t* pm_newline_list_t::offsets

The list of offsets.

Definition at line 39 of file pm_newline_list.h.

Referenced by pm_newline_list_append(), pm_newline_list_free(), pm_newline_list_init(), pm_newline_list_line(), and pm_newline_list_line_column().

## ◆ size

size_t pm_newline_list_t::size

The number of offsets in the list.

Definition at line 33 of file pm_newline_list.h.

Referenced by pm_newline_list_append(), pm_newline_list_clear(), pm_newline_list_init(), pm_newline_list_line(), and pm_newline_list_line_column().

## ◆ start

const uint8_t* pm_newline_list_t::start

A pointer to the start of the source string.

Definition at line 30 of file pm_newline_list.h.

Referenced by pm_newline_list_append(), pm_newline_list_init(), pm_newline_list_line(), and pm_newline_list_line_column().

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

- prism/util/pm_newline_list.h