Ruby  3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
Data Structures | Macros | Enumerations | Functions
struct.h File Reference

(b76ad15ed0da636161de0243c547ee1e6fc95681)

Internal header for Struct. More...

#include "ruby/internal/stdbool.h"
#include "internal/gc.h"
#include "ruby/ruby.h"
Include dependency graph for struct.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  RStruct
 

Macros

#define RSTRUCT(obj)   ((struct RStruct *)(obj))
 
#define RSTRUCT_LEN   internal_RSTRUCT_LEN
 
#define RSTRUCT_SET   internal_RSTRUCT_SET
 
#define RSTRUCT_GET   internal_RSTRUCT_GET
 

Enumerations

enum  { RSTRUCT_EMBED_LEN_MAX = RVALUE_EMBED_LEN_MAX, RSTRUCT_EMBED_LEN_MASK = (RUBY_FL_USER2|RUBY_FL_USER1), RSTRUCT_EMBED_LEN_SHIFT = (RUBY_FL_USHIFT+1), RSTRUCT_TRANSIENT_FLAG = FL_USER3 }
 

Functions

VALUE rb_struct_init_copy (VALUE copy, VALUE s)
 
VALUE rb_struct_lookup (VALUE s, VALUE idx)
 
VALUE rb_struct_s_keyword_init (VALUE klass)
 

Detailed Description

Internal header for Struct.

Author
Ruby developers ruby-.nosp@m.core.nosp@m.@ruby.nosp@m.-lan.nosp@m.g.org

Definition in file struct.h.

Macro Definition Documentation

◆ RSTRUCT

#define RSTRUCT (   obj)    ((struct RStruct *)(obj))

Definition at line 34 of file struct.h.

◆ RSTRUCT_GET

#define RSTRUCT_GET   internal_RSTRUCT_GET

Definition at line 54 of file struct.h.

◆ RSTRUCT_LEN

#define RSTRUCT_LEN   internal_RSTRUCT_LEN

Definition at line 52 of file struct.h.

◆ RSTRUCT_SET

#define RSTRUCT_SET   internal_RSTRUCT_SET

Definition at line 53 of file struct.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RSTRUCT_EMBED_LEN_MAX 
RSTRUCT_EMBED_LEN_MASK 
RSTRUCT_EMBED_LEN_SHIFT 
RSTRUCT_TRANSIENT_FLAG 

Definition at line 16 of file struct.h.

Function Documentation

◆ rb_struct_init_copy()

VALUE rb_struct_init_copy ( VALUE  copy,
VALUE  s 
)

Definition at line 1041 of file struct.c.

References len, OBJ_INIT_COPY, rb_eTypeError, rb_raise(), RSTRUCT_GET, RSTRUCT_LEN, and RSTRUCT_SET.

◆ rb_struct_lookup()

VALUE rb_struct_lookup ( VALUE  s,
VALUE  idx 
)

Definition at line 1167 of file struct.c.

◆ rb_struct_s_keyword_init()

VALUE rb_struct_s_keyword_init ( VALUE  klass)

Definition at line 60 of file struct.c.