Ruby 3.5.0dev (2025-02-22 revision 412997300569c1853c09813e4924b6df3d7e8669)
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:1187
VALUE rb_define_class(const char *name, VALUE super)
Defines a top-level class.
Definition class.c:980
void rb_extend_object(VALUE obj, VALUE mod)
Extend the object with the module.
Definition eval.c:1755
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:1438
VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
Defines a class under the namespace of outer.
Definition class.c:1012
VALUE rb_define_module(const char *name)
Defines a top-level module.
Definition class.c:1095
VALUE rb_define_module_under(VALUE outer, const char *name)
Defines a module under the namespace of outer.
Definition class.c:1119
#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