Ruby  3.4.0dev (2024-11-22 revision 0989400a925cd201defdca9eb28eb87200b30785)
method.h
Go to the documentation of this file.
1 #ifndef RBIMPL_METHOD_H /*-*-C++-*-vi:se ft=cpp:*/
2 #define RBIMPL_METHOD_H
25 #include "ruby/internal/value.h"
26 #include "ruby/backward/2/stdarg.h"
27 
87 
99 void rb_define_method(VALUE klass, const char *mid, VALUE (*func)(ANYARGS), int arity);
100 
112 void rb_define_module_function(VALUE klass, const char *mid, VALUE (*func)(ANYARGS), int arity);
113 
124 void rb_define_global_function(const char *mid, VALUE (*func)(ANYARGS), int arity);
125 
164 void rb_undef_method(VALUE klass, const char *name);
165 
185 void rb_define_alias(VALUE klass, const char *dst, const char *src);
186 
199 void rb_define_attr(VALUE klass, const char *name, int read, int write);
200 
204 
205 #endif /* RBIMPL_METHOD_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_define_alias(VALUE klass, const char *name1, const char *name2)
Defines an alias of a method.
Definition: class.c:2345
void rb_define_module_function(VALUE module, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a module function for a module.
Definition: class.c:2329
void rb_define_attr(VALUE klass, const char *name, int read, int write)
Defines public accessor method(s) for an attribute.
Definition: class.c:2351
void rb_undef_method(VALUE klass, const char *name)
Defines an undef of a method.
Definition: class.c:2166
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a method.
Definition: class.c:2142
void rb_define_global_function(const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a global function.
Definition: class.c:2339
Defines RBIMPL_ATTR_NONNULL.
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition: nonnull.h:27
Defines old _.
#define ANYARGS
Functions declared using this macro take arbitrary arguments, including void.
Definition: stdarg.h:64
Defines VALUE and ID.
uintptr_t VALUE
Type that represents a Ruby object.
Definition: value.h:40