Ruby: include/ruby/internal/method.h Source File

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

method.h
Go to the documentation of this file.
1#ifndef RBIMPL_METHOD_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_METHOD_H
23#include "ruby/internal/dllexport.h"
24#include "ruby/internal/value.h"
25#include "ruby/backward/2/stdarg.h"
26
27 RBIMPL_SYMBOL_EXPORT_BEGIN()
28
29void rb_define_method(VALUE,const char*,VALUE(*)(ANYARGS),int);
30void rb_define_module_function(VALUE,const char*,VALUE(*)(ANYARGS),int);
31void rb_define_global_function(const char*,VALUE(*)(ANYARGS),int);
32
33void rb_undef_method(VALUE,const char*);
34void rb_define_alias(VALUE,const char*,const char*);
35void rb_define_attr(VALUE,const char*,int,int);
36
37 RBIMPL_SYMBOL_EXPORT_END()
38
39#endif /* RBIMPL_METHOD_H */
rb_define_method
#define rb_define_method(klass, mid, func, arity)
Defines klass#mid.
Definition: cxxanyargs.hpp:653
rb_define_module_function
#define rb_define_module_function(klass, mid, func, arity)
Defines klass#mid and makes it a module function.
Definition: cxxanyargs.hpp:672
rb_define_global_function
#define rb_define_global_function(mid, func, arity)
Defines rb_mKernel #mid.
Definition: cxxanyargs.hpp:678
dllexport.h
Tewaking visibility of C variables/functions.
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition: dllexport.h:86
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition: dllexport.h:77
rb_define_attr
void rb_define_attr(VALUE, const char *, int, int)
Defines (a) public accessor method(s) for an attribute.
Definition: class.c:2012
rb_undef_method
void rb_undef_method(VALUE, const char *)
Definition: class.c:1777
rb_define_alias
void rb_define_alias(VALUE, const char *, const char *)
Defines an alias of a method.
Definition: class.c:1999
stdarg.h
Defines old _.
ANYARGS
#define ANYARGS
Definition: stdarg.h:42
const
#define const
Definition: strftime.c:108
value.h
Defines VALUE and ID.
VALUE
unsigned long VALUE
Definition: value.h:38