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

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

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_global_function
| Dispatches appropriate driver for rb_define_global_function. 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_module_function
| Dispatches appropriate driver for rb_define_module_function. 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...

## 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.