|
Ruby 3.4.5p51 (2025-07-16 revision 20cda200d3ce092571d0b5d342dadca69636cb0f)
|
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/long.h"#include "ruby/internal/arithmetic/int.h"#include "ruby/backward.h"Go to the source code of this file.
Macros | |
| #define | RSTRUCT_PTR(st) |
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 long | 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.
| #define RSTRUCT_PTR | ( | st | ) |
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 1218 of file struct.c.
Referenced by rb_struct_aref(), and 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 1256 of file struct.c.
Referenced by rb_struct_aset(), and RSTRUCT_SET().
Returns the number of struct members.
| [in] | st | An instance of RStruct. |
Definition at line 1506 of file struct.c.
Referenced by rb_struct_size(), and 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. |
|
inlinestatic |
Returns the number of struct members.
| [in] | st | An instance of RStruct. |
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. |