Ruby 3.2.1p31 (2023-02-08 revision 31819e82c88c6f8ecfaeb162519bfa26a14b21fd)
module.h
Go to the documentation of this file.
1#ifndef RBIMPL_MODULE_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_MODULE_H
24#include "ruby/internal/value.h"
25
42
67VALUE rb_define_class(const char *name, VALUE super);
68
86VALUE rb_define_module(const char *name);
87
109VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super);
110
124VALUE rb_define_module_under(VALUE outer, const char *name);
125
138void rb_include_module(VALUE klass, VALUE module);
139
150void rb_extend_object(VALUE obj, VALUE mod);
151
171void rb_prepend_module(VALUE klass, VALUE module);
172
176
177#endif /* RBIMPL_MODULE_H */
Tweaking visibility of C variables/functions.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition: dllexport.h:106
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition: dllexport.h:97
void rb_include_module(VALUE klass, VALUE module)
Includes a module to a class.
Definition: class.c:1090
VALUE rb_define_class(const char *name, VALUE super)
Defines a top-level class.
Definition: class.c:888
void rb_extend_object(VALUE obj, VALUE mod)
Extend the object with the module.
Definition: eval.c:1689
void rb_prepend_module(VALUE klass, VALUE module)
Identical to rb_include_module(), except it "prepends" the passed module to the klass,...
Definition: class.c:1345
VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
Defines a class under the namespace of outer.
Definition: class.c:920
VALUE rb_define_module(const char *name)
Defines a top-level module.
Definition: class.c:998
VALUE rb_define_module_under(VALUE outer, const char *name)
Defines a module under the namespace of outer.
Definition: class.c:1022
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition: nonnull.h:30
Defines VALUE and ID.
uintptr_t VALUE
Type that represents a Ruby object.
Definition: value.h:40