|
Ruby 4.1.0dev (2026-11-19 revision b409062b86ed964c0779df64675ef171a6c93a76)
|
Routines to manipulate struct RStruct. More...
#include "ruby/internal/attr/artificial.h"#include "ruby/internal/dllexport.h"#include "ruby/internal/value.h"#include "ruby/internal/value_type.h"#include "ruby/internal/arithmetic/int.h"#include "ruby/internal/arithmetic/len_t.h"#include "ruby/backward.h"

Go to the source code of this file.
Functions | |
| VALUE | rb_struct_size (VALUE st) |
| Returns the number of struct members. | |
| VALUE | rb_struct_aref (VALUE st, VALUE k) |
| Resembles Struct#[]. | |
| VALUE | rb_struct_aset (VALUE st, VALUE k, VALUE v) |
| Resembles Struct#[]=. | |
| static rb_len_t | RSTRUCT_LEN (VALUE st) |
| Returns the number of struct members. | |
| static VALUE | RSTRUCT_SET (VALUE st, int k, VALUE v) |
| Resembles Struct#[]=. | |
| static VALUE | RSTRUCT_GET (VALUE st, int k) |
| Resembles Struct#[]. | |
Routines to manipulate struct RStruct.
Definition in file rstruct.h.
Resembles Struct#[].
| [in] | st | An instance of RStruct. |
| [in] | k | Index a.k.a. key of the struct. |
| rb_eTypeError | `k` is neither Numeric, Symbol, nor String. |
| rb_eIndexError | Numerical index out of range. |
| rb_eNameError | No such key. |
Definition at line 1317 of file struct.c.
Referenced by RSTRUCT_GET().
Resembles Struct#[]=.
| [out] | st | An instance of RStruct. |
| [in] | k | Index a.k.a. key of the struct. |
| [in] | v | Value to store. |
| rb_eTypeError | `k` is neither Numeric, Symbol, nor String. |
| rb_eIndexError | Numerical index out of range. |
| rb_eNameError | No such key. |
Definition at line 1355 of file struct.c.
Referenced by RSTRUCT_SET().
Returns the number of struct members.
| [in] | st | An instance of RStruct. |
Definition at line 1605 of file struct.c.
Referenced by RSTRUCT_LEN().
Resembles Struct#[].
| [in] | st | An instance of RStruct. |
| [in] | k | Index a.k.a. key of the struct. |
| rb_eTypeError | `k` is neither Numeric, Symbol, nor String. |
| rb_eIndexError | Numerical index out of range. |
| rb_eNameError | No such key. |
Definition at line 102 of file rstruct.h.
Referenced by RSTRUCT_GET().
Returns the number of struct members.
| [in] | st | An instance of RStruct. |
Definition at line 82 of file rstruct.h.
Referenced by RSTRUCT_LEN().
Resembles Struct#[]=.
| [out] | st | An instance of RStruct. |
| [in] | k | Index a.k.a. key of the struct. |
| [in] | v | Value to store. |
| rb_eTypeError | `k` is neither Numeric, Symbol, nor String. |
| rb_eIndexError | Numerical index out of range. |
| rb_eNameError | No such key. |
Definition at line 92 of file rstruct.h.
Referenced by RSTRUCT_SET().