Ruby: internal/class.h File Reference

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

Data Structures | Macros | Typedefs | Functions
class.h File Reference

Internal header for Class. More...

`#include "id_table.h"`
`#include "internal/gc.h"`
`#include "internal/serial.h"`
`#include "ruby/internal/stdbool.h"`
`#include "ruby/intern.h"`
`#include "ruby/ruby.h"`

Go to the source code of this file.

## Data Structures
struct | rb_subclass_entry
struct | rb_iv_index_tbl_entry
struct | rb_classext_struct
struct | RClass

## Macros
#define | RCLASS_EXT(c) (RCLASS(c)->ptr)
#define | RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
#define | RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
#define | RCLASS_M_TBL(c) (RCLASS_EXT(c)->m_tbl)
#define | RCLASS_CALLABLE_M_TBL(c) (RCLASS_EXT(c)->callable_m_tbl)
#define | RCLASS_CC_TBL(c) (RCLASS_EXT(c)->cc_tbl)
#define | RCLASS_IV_INDEX_TBL(c) (RCLASS_EXT(c)->iv_index_tbl)
#define | RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin_)
#define | RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
#define | RCLASS_SERIAL(c) (RCLASS(c)->class_serial)
#define | RCLASS_INCLUDER(c) (RCLASS_EXT(c)->includer)
#define | RICLASS_IS_ORIGIN FL_USER5
#define | RCLASS_CLONED FL_USER6
#define | RICLASS_ORIGIN_SHARED_MTBL FL_USER8

## Typedefs
typedef struct rb_subclass_entry | rb_subclass_entry_t
typedef struct rb_classext_struct | rb_classext_t

## Functions
void | rb_class_subclass_add (VALUE super, VALUE klass)
void | rb_class_remove_from_super_subclasses (VALUE)
int | rb_singleton_class_internal_p (VALUE sklass)
VALUE | rb_class_boot (VALUE)
| A utility function that wraps class_alloc. More...
VALUE | rb_make_metaclass (VALUE, VALUE)
VALUE | rb_include_class_new (VALUE, VALUE)
void | rb_class_foreach_subclass (VALUE klass, void(*f)(VALUE, VALUE), VALUE)
void | rb_class_detach_subclasses (VALUE)
void | rb_class_detach_module_subclasses (VALUE)
void | rb_class_remove_from_module_subclasses (VALUE)
VALUE | rb_obj_methods (int argc, const VALUE *argv, VALUE obj)
VALUE | rb_obj_protected_methods (int argc, const VALUE *argv, VALUE obj)
VALUE | rb_obj_private_methods (int argc, const VALUE *argv, VALUE obj)
VALUE | rb_obj_public_methods (int argc, const VALUE *argv, VALUE obj)
VALUE | rb_special_singleton_class (VALUE)
VALUE | rb_singleton_class_clone_and_attach (VALUE obj, VALUE attach)
VALUE | rb_singleton_class_get (VALUE obj)
| Returns the singleton class of obj, or nil if obj is not a singleton object. More...
int | rb_class_has_methods (VALUE c)
void | rb_undef_methods_from (VALUE klass, VALUE super)
VALUE | rb_class_inherited (VALUE, VALUE)
| Calls Class::inherited. More...
VALUE | rb_keyword_error_new (const char *, VALUE)

## Detailed Description

Internal header for Class.

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

Copyright
  This file is a part of the programming language Ruby. Permission is hereby granted, to either redistribute and/or modify this file, provided that the conditions mentioned in the file COPYING are met. Consult the file for details.

Definition in file class.h.

## Macro Definition Documentation

## ◆ RCLASS_CALLABLE_M_TBL

#define RCLASS_CALLABLE_M_TBL | ( |  | c | ) | (RCLASS_EXT(c)->callable_m_tbl)

Definition at line 84 of file class.h.

## ◆ RCLASS_CC_TBL

#define RCLASS_CC_TBL | ( |  | c | ) | (RCLASS_EXT(c)->cc_tbl)

Definition at line 85 of file class.h.

## ◆ RCLASS_CLONED

#define RCLASS_CLONED FL_USER6

Definition at line 97 of file class.h.

## ◆ RCLASS_CONST_TBL

#define RCLASS_CONST_TBL | ( |  | c | ) | (RCLASS_EXT(c)->const_tbl)

Definition at line 78 of file class.h.

## ◆ RCLASS_EXT

#define RCLASS_EXT | ( |  | c | ) | (RCLASS(c)->ptr)

Definition at line 76 of file class.h.

## ◆ RCLASS_INCLUDER

#define RCLASS_INCLUDER | ( |  | c | ) | (RCLASS_EXT(c)->includer)

Definition at line 94 of file class.h.

## ◆ RCLASS_IV_INDEX_TBL

#define RCLASS_IV_INDEX_TBL | ( |  | c | ) | (RCLASS_EXT(c)->iv_index_tbl)

Definition at line 86 of file class.h.

## ◆ RCLASS_IV_TBL

#define RCLASS_IV_TBL | ( |  | c | ) | (RCLASS_EXT(c)->iv_tbl)

Definition at line 77 of file class.h.

## ◆ RCLASS_M_TBL

#define RCLASS_M_TBL | ( |  | c | ) | (RCLASS_EXT(c)->m_tbl)

Definition at line 80 of file class.h.

## ◆ RCLASS_ORIGIN

#define RCLASS_ORIGIN | ( |  | c | ) | (RCLASS_EXT(c)->origin_)

Definition at line 87 of file class.h.

## ◆ RCLASS_REFINED_CLASS

#define RCLASS_REFINED_CLASS | ( |  | c | ) | (RCLASS_EXT(c)->refined_class)

Definition at line 88 of file class.h.

## ◆ RCLASS_SERIAL

#define RCLASS_SERIAL | ( |  | c | ) | (RCLASS(c)->class_serial)

Definition at line 90 of file class.h.

## ◆ RICLASS_IS_ORIGIN

#define RICLASS_IS_ORIGIN FL_USER5

Definition at line 96 of file class.h.

## ◆ RICLASS_ORIGIN_SHARED_MTBL

#define RICLASS_ORIGIN_SHARED_MTBL FL_USER8

Definition at line 98 of file class.h.

## Typedef Documentation

## ◆ rb_classext_t

typedef struct rb_classext_struct rb_classext_t

Definition at line 74 of file class.h.

## ◆ rb_subclass_entry_t

typedef struct rb_subclass_entry rb_subclass_entry_t

Definition at line 73 of file class.h.