Ruby: RString Struct Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Data Fields
RString Struct Reference

`#include <rstring.h>`

## Data Fields
struct RBasic | basic
union {
struct {
long len
char * ptr
union {
long capa
VALUE shared
} aux
} heap
char ary [RSTRING_EMBED_LEN_MAX+1]
} | as

## Detailed Description

Definition at line 73 of file rstring.h.

## Field Documentation

## ◆ ary

char RString::ary[RSTRING_EMBED_LEN_MAX+1]

Definition at line 84 of file rstring.h.

Referenced by rb_sym_all_symbols().

## ◆

union { ... } RString::as

Referenced by rb_str_resize(), and rb_str_tmp_frozen_release().

## ◆

union { ... } RString::aux

## ◆ basic

struct RBasic RString::basic

Definition at line 74 of file rstring.h.

## ◆ capa

long RString::capa

Definition at line 80 of file rstring.h.

Referenced by rb_str_buf_new(), rb_str_change_terminator_length(), rb_str_resize(), and rb_str_set_len().

## ◆

struct { ... } RString::heap

## ◆ len

long RString::len

Definition at line 77 of file rstring.h.

## ◆ ptr

char* RString::ptr

Definition at line 78 of file rstring.h.

## ◆ shared

VALUE RString::shared

Definition at line 81 of file rstring.h.

Referenced by rb_str_tmp_frozen_release().

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

- include/ruby/internal/core/rstring.h