Ruby: ruby::backward::cxxanyargs::define_method Namespace Reference

Ruby 3.4.9p82 (2026-03-11 revision 76cca827ab52ab1d346a728f068d5b8da3e2952b)

Data Structures | Typedefs
ruby::backward::cxxanyargs::define_method Namespace Reference

Driver for *_define_method. More...

## Data Structures
struct | driver
| Template metaprogramming to generate function prototypes. More...
struct | driver0
| Template metaprogramming to generate function prototypes. More...
struct | rb_define_method
| Dispatches appropriate driver for rb_define_method. More...
struct | rb_define_method_id
| Dispatches appropriate driver for rb_define_method_id. More...
struct | rb_define_private_method
| Dispatches appropriate driver for rb_define_private_method. More...
struct | rb_define_protected_method
| Dispatches appropriate driver for rb_define_protected_method. More...
struct | rb_define_singleton_method
| Dispatches appropriate driver for rb_define_singleton_method. More...
struct | rb_define_module_function
| Dispatches appropriate driver for rb_define_module_function. More...
struct | rb_define_global_function
| Dispatches appropriate driver for rb_define_global_function. More...

## Typedefs
typedef VALUE | notimpl_type(int, const VALUE *, VALUE, VALUE)
| Type of rb_f_notimplement().

## Detailed Description

Driver for *_define_method.

rb_define_method function for instance takes a pointer to ANYARGS-ed functions, which in fact varies 18 different prototypes. We still need to preserve ANYARGS for storages but why not check the consistencies if possible. In C++ a function has its own prototype, which is a compile-time constant (static type) by nature. We can list up all the possible input types and provide warnings for other cases. This is such attempt.

## Typedef Documentation

## ◆ notimpl_type

typedef VALUE ruby::backward::cxxanyargs::define_method::notimpl_type(int, const VALUE *, VALUE, VALUE)

Type of rb_f_notimplement().

Definition at line 517 of file cxxanyargs.hpp.