Ruby 4.1.0dev (2026-04-17 revision 11e3c78b61da705c783dd12fb7f158c0d256ede0)
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:74
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:65
void rb_include_module(VALUE klass, VALUE module)
Includes a module to a class.
Definition class.c:1733
VALUE rb_define_class(const char *name, VALUE super)
Defines a top-level class.
Definition class.c:1526
void rb_extend_object(VALUE obj, VALUE mod)
Extend the object with the module.
Definition eval.c:1868
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:1983
VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
Defines a class under the namespace of outer.
Definition class.c:1557
VALUE rb_define_module(const char *name)
Defines a top-level module.
Definition class.c:1639
VALUE rb_define_module_under(VALUE outer, const char *name)
Defines a module under the namespace of outer.
Definition class.c:1662
#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