Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
cxxanyargs.hpp
Go to the documentation of this file.
1#ifndef RUBY_BACKWARD_CXXANYARGS_HPP //-*-C++-*-vi:ft=cpp
2#define RUBY_BACKWARD_CXXANYARGS_HPP
23#include "ruby/internal/value.h"
26#include "ruby/st.h"
27
28extern "C++" {
29
30#ifdef HAVE_NULLPTR
31#include <cstddef>
32#endif
33
37namespace ruby {
38
40namespace backward {
41
54namespace cxxanyargs {
55
56typedef VALUE type(ANYARGS);
57typedef void void_type(ANYARGS);
58typedef int int_type(ANYARGS);
60
63
64RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
72inline void
74{
75 rb_gvar_getter_t *r = reinterpret_cast<rb_gvar_getter_t*>(w);
76 rb_gvar_setter_t *t = reinterpret_cast<rb_gvar_setter_t*>(e);
78}
79
80RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
81inline void
83{
84 rb_gvar_setter_t *t = reinterpret_cast<rb_gvar_setter_t*>(e);
86}
87
88RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
89inline void
91{
92 rb_gvar_getter_t *r = reinterpret_cast<rb_gvar_getter_t*>(w);
94}
95
96#ifdef HAVE_NULLPTR
97inline void
98rb_define_virtual_variable(const char *q, rb_gvar_getter_t *w, std::nullptr_t e)
99{
101}
102
103RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
104inline void
105rb_define_virtual_variable(const char *q, type *w, std::nullptr_t e)
106{
107 rb_gvar_getter_t *r = reinterpret_cast<rb_gvar_getter_t *>(w);
109}
110
111inline void
112rb_define_virtual_variable(const char *q, std::nullptr_t w, rb_gvar_setter_t *e)
113{
115}
116
117RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
118inline void
119rb_define_virtual_variable(const char *q, std::nullptr_t w, void_type *e)
120{
121 rb_gvar_setter_t *r = reinterpret_cast<rb_gvar_setter_t *>(e);
123}
124#endif
125
126RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
135inline void
137{
138 rb_gvar_getter_t *t = reinterpret_cast<rb_gvar_getter_t*>(e);
139 rb_gvar_setter_t *y = reinterpret_cast<rb_gvar_setter_t*>(r);
141}
142
143RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
144inline void
146{
147 rb_gvar_setter_t *y = reinterpret_cast<rb_gvar_setter_t*>(r);
148 ::rb_define_hooked_variable(q, w, e, y);
149}
150
151RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
152inline void
154{
155 rb_gvar_getter_t *t = reinterpret_cast<rb_gvar_getter_t*>(e);
157}
158
159#ifdef HAVE_NULLPTR
160inline void
161rb_define_hooked_variable(const char *q, VALUE *w, rb_gvar_getter_t *e, std::nullptr_t r)
162{
163 ::rb_define_hooked_variable(q, w, e, r);
164}
165
166RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
167inline void
168rb_define_hooked_variable(const char *q, VALUE *w, type *e, std::nullptr_t r)
169{
170 rb_gvar_getter_t *y = reinterpret_cast<rb_gvar_getter_t *>(e);
171 ::rb_define_hooked_variable(q, w, y, r);
172}
173
174inline void
175rb_define_hooked_variable(const char *q, VALUE *w, std::nullptr_t e, rb_gvar_setter_t *r)
176{
177 ::rb_define_hooked_variable(q, w, e, r);
178}
179
180RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
181inline void
182rb_define_hooked_variable(const char *q, VALUE *w, std::nullptr_t e, void_type *r)
183{
184 rb_gvar_setter_t *y = reinterpret_cast<rb_gvar_setter_t *>(r);
185 ::rb_define_hooked_variable(q, w, e, y);
186}
187#endif
188
192
193RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
203inline VALUE
205{
206 rb_block_call_func_t t = reinterpret_cast<rb_block_call_func_t>(e);
207 return ::rb_iterate(q, w, t, r);
208}
209
210#ifdef HAVE_NULLPTR
211inline VALUE
212rb_iterate(onearg_type *q, VALUE w, std::nullptr_t e, VALUE r)
213{
214 return ::rb_iterate(q, w, e, r);
215}
216#endif
217
218RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
229inline VALUE
231{
232 rb_block_call_func_t u = reinterpret_cast<rb_block_call_func_t>(t);
233 return ::rb_block_call(q, w, e, r, u, y);
234}
235
236#ifdef HAVE_NULLPTR
237inline VALUE
238rb_block_call(VALUE q, ID w, int e, const VALUE *r, std::nullptr_t t, VALUE y)
239{
240 return ::rb_block_call(q, w, e, r, t, y);
241}
242#endif
243
244RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
257inline VALUE
259{
260 typedef VALUE func1_t(VALUE);
261 typedef VALUE func2_t(VALUE, VALUE);
262 func1_t *t = reinterpret_cast<func1_t*>(q);
263 func2_t *y = reinterpret_cast<func2_t*>(e);
264 return ::rb_rescue(t, w, y, r);
265}
266
267RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
281inline VALUE
282rb_rescue2(type *q, VALUE w, type *e, VALUE r, ...)
283{
284 typedef VALUE func1_t(VALUE);
285 typedef VALUE func2_t(VALUE, VALUE);
286 func1_t *t = reinterpret_cast<func1_t*>(q);
287 func2_t *y = reinterpret_cast<func2_t*>(e);
288 va_list ap;
289 va_start(ap, r);
290 VALUE ret = ::rb_vrescue2(t, w, y, r, ap);
291 va_end(ap);
292 return ret;
293}
294
295RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
307inline VALUE
309{
310 typedef VALUE func1_t(VALUE);
311 func1_t *t = reinterpret_cast<func1_t*>(q);
312 func1_t *y = reinterpret_cast<func1_t*>(e);
313 return ::rb_ensure(t, w, y, r);
314}
315
316RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
328inline VALUE
329rb_catch(const char *q, type *w, VALUE e)
330{
331 rb_block_call_func_t r = reinterpret_cast<rb_block_call_func_t>(w);
332 return ::rb_catch(q, r, e);
333}
334
335#ifdef HAVE_NULLPTR
336inline VALUE
337rb_catch(const char *q, std::nullptr_t w, VALUE e)
338{
339 return ::rb_catch(q, w, e);
340}
341#endif
342
343RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
355inline VALUE
357{
358 rb_block_call_func_t r = reinterpret_cast<rb_block_call_func_t>(w);
359 return ::rb_catch_obj(q, r, e);
360}
361
365
366RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
375inline VALUE
377{
378 rb_block_call_func_t e = reinterpret_cast<rb_block_call_func_t>(q);
379 return ::rb_fiber_new(e, w);
380}
381
382RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
391inline VALUE
393{
394 rb_block_call_func_t e = reinterpret_cast<rb_block_call_func_t>(q);
395 return ::rb_proc_new(e, w);
396}
397
398RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
407inline VALUE
409{
410 typedef VALUE ptr_t(void*);
411 ptr_t *e = reinterpret_cast<ptr_t*>(q);
412 return ::rb_thread_create(e, w);
413}
414
418
419RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
429inline int
431{
433 reinterpret_cast<st_foreach_callback_func*>(w);
434 return ::st_foreach(q, r, e);
435}
436
437RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
447inline int
449{
451 reinterpret_cast<st_foreach_check_callback_func*>(w);
452 return ::st_foreach_check(q, t, e, 0);
453}
454
455RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
463inline void
465{
467 reinterpret_cast<st_foreach_callback_func*>(w);
468 ::st_foreach_safe(q, r, e);
469}
470
471RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
479inline void
481{
483 reinterpret_cast<st_foreach_callback_func*>(w);
484 ::rb_hash_foreach(q, r, e);
485}
486
487RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
495inline void
497{
499 reinterpret_cast<st_foreach_callback_func*>(w);
500 ::rb_ivar_foreach(q, r, e);
501}
502
504
512namespace define_method {
513
515typedef VALUE notimpl_type(int, const VALUE *, VALUE, VALUE);
516
520template<typename T, void (*F)(VALUE klass, T mid, type *func, int arity)>
521struct driver {
522
526 template<int N, typename U>
527 struct engine {
528
529 /* :TODO: Following deprecation attribute renders tons of warnings (one
530 * per every method definitions), which is annoying. Of course
531 * annoyance is the core feature of deprecation warnings... But that
532 * could be too much, especially when the warnings happen inside of
533 * machine-generated programs. And SWIG is known to do such thing.
534 * The new (granular) API was introduced in API version 2.7. As of
535 * this writing the version is 2.8. Let's warn this later, some time
536 * during 3.x. Hopefully codes in old (ANYARGS-ed) format should be
537 * less than now. */
538#if (RUBY_API_VERSION_MAJOR * 100 + RUBY_API_VERSION_MINOR) >= 301
539 RUBY_CXX_DEPRECATED("use of ANYARGS is deprecated")
540#endif
543 static inline void
544 define(VALUE klass, T mid, type func)
545 {
546 F(klass, mid, func, N);
547 }
548
553 static inline void
554 define(VALUE klass, T mid, U func)
555 {
556 F(klass, mid, reinterpret_cast<type *>(func), N);
557 }
558
560 static inline void
561 define(VALUE klass, T mid, notimpl_type func)
562 {
563 F(klass, mid, reinterpret_cast<type *>(func), N);
564 }
565 };
566
568 template<int N, bool = false> struct specific : public engine<N, type *> {};
569 template<bool b> struct specific<15, b> : public engine<15, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
570 template<bool b> struct specific<14, b> : public engine<14, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
571 template<bool b> struct specific<13, b> : public engine<13, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
572 template<bool b> struct specific<12, b> : public engine<12, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
573 template<bool b> struct specific<11, b> : public engine<11, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
574 template<bool b> struct specific<10, b> : public engine<10, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
575 template<bool b> struct specific< 9, b> : public engine< 9, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
576 template<bool b> struct specific< 8, b> : public engine< 8, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
577 template<bool b> struct specific< 7, b> : public engine< 7, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
578 template<bool b> struct specific< 6, b> : public engine< 6, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
579 template<bool b> struct specific< 5, b> : public engine< 5, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
580 template<bool b> struct specific< 4, b> : public engine< 4, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE)> {};
581 template<bool b> struct specific< 3, b> : public engine< 3, VALUE(*)(VALUE, VALUE, VALUE, VALUE)> {};
582 template<bool b> struct specific< 2, b> : public engine< 2, VALUE(*)(VALUE, VALUE, VALUE)> {};
583 template<bool b> struct specific< 1, b> : public engine< 1, VALUE(*)(VALUE, VALUE)> {};
584 template<bool b> struct specific< 0, b> : public engine< 0, VALUE(*)(VALUE)> {};
585 template<bool b> struct specific<-1, b> : public engine<-1, VALUE(*)(int argc, VALUE *argv, VALUE self)> {
586 using engine<-1, VALUE(*)(int argc, VALUE *argv, VALUE self)>::define;
587 static inline void define(VALUE c, T m, VALUE(*f)(int argc, const VALUE *argv, VALUE self)) { F(c, m, reinterpret_cast<type *>(f), -1); }
588 };
589 template<bool b> struct specific<-2, b> : public engine<-2, VALUE(*)(VALUE, VALUE)> {};
591};
592
593/* We could perhaps merge this struct into the one above using variadic
594 * template parameters if we could assume C++11, but sadly we cannot. */
595template<typename T, void (*F)(T mid, type func, int arity)>
596struct driver0 {
597 template<int N, typename U>
598 struct engine {
599 RUBY_CXX_DEPRECATED("use of ANYARGS is deprecated")
600 static inline void
601 define(T mid, type func)
602 {
603 F(mid, func, N);
604 }
605 static inline void
606 define(T mid, U func)
607 {
608 F(mid, reinterpret_cast<type *>(func), N);
609 }
610 static inline void
612 {
613 F(mid, reinterpret_cast<type *>(func), N);
614 }
615 };
617 template<int N, bool = false> struct specific : public engine<N, type *> {};
618 template<bool b> struct specific<15, b> : public engine<15, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
619 template<bool b> struct specific<14, b> : public engine<14, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
620 template<bool b> struct specific<13, b> : public engine<13, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
621 template<bool b> struct specific<12, b> : public engine<12, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
622 template<bool b> struct specific<11, b> : public engine<11, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
623 template<bool b> struct specific<10, b> : public engine<10, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
624 template<bool b> struct specific< 9, b> : public engine< 9, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
625 template<bool b> struct specific< 8, b> : public engine< 8, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
626 template<bool b> struct specific< 7, b> : public engine< 7, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
627 template<bool b> struct specific< 6, b> : public engine< 6, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
628 template<bool b> struct specific< 5, b> : public engine< 5, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)> {};
629 template<bool b> struct specific< 4, b> : public engine< 4, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE)> {};
630 template<bool b> struct specific< 3, b> : public engine< 3, VALUE(*)(VALUE, VALUE, VALUE, VALUE)> {};
631 template<bool b> struct specific< 2, b> : public engine< 2, VALUE(*)(VALUE, VALUE, VALUE)> {};
632 template<bool b> struct specific< 1, b> : public engine< 1, VALUE(*)(VALUE, VALUE)> {};
633 template<bool b> struct specific< 0, b> : public engine< 0, VALUE(*)(VALUE)> {};
634 template<bool b> struct specific<-1, b> : public engine<-1, VALUE(*)(int argc, VALUE *argv, VALUE self)> {
635 using engine<-1, VALUE(*)(int argc, VALUE *argv, VALUE self)>::define;
636 static inline void define(T m, VALUE(*f)(int argc, const VALUE *argv, VALUE self)) { F(m, reinterpret_cast<type *>(f), -1); }
637 };
638 template<bool b> struct specific<-2, b> : public engine<-2, VALUE(*)(VALUE, VALUE)> {};
640};
641
642struct rb_define_method : public driver <const char *, ::rb_define_method> {};
643struct rb_define_method_id : public driver <ID, ::rb_define_method_id> {};
644struct rb_define_private_method : public driver <const char *, ::rb_define_private_method> {};
645struct rb_define_protected_method : public driver <const char *, ::rb_define_protected_method> {};
646struct rb_define_singleton_method : public driver <const char *, ::rb_define_singleton_method> {};
647struct rb_define_module_function : public driver <const char *, ::rb_define_module_function> {};
648struct rb_define_global_function : public driver0<const char *, ::rb_define_global_function> {};
649
653#define rb_define_method(klass, mid, func, arity) ruby::backward::cxxanyargs::define_method::rb_define_method::specific<arity>::define(klass, mid, func)
654
656#define rb_define_method_id(klass, mid, func, arity) ruby::backward::cxxanyargs::define_method::rb_define_method_id::specific<arity>::define(klass, mid, func)
657
660#define rb_define_private_method(klass, mid, func, arity) ruby::backward::cxxanyargs::define_method::rb_define_private_method::specific<arity>::define(klass, mid, func)
661
664#define rb_define_protected_method(klass, mid, func, arity) ruby::backward::cxxanyargs::define_method::rb_define_protected_method::specific<arity>::define(klass, mid, func)
665
668#define rb_define_singleton_method(klass, mid, func, arity) ruby::backward::cxxanyargs::define_method::rb_define_singleton_method::specific<arity>::define(klass, mid, func)
669
672#define rb_define_module_function(klass, mid, func, arity) ruby::backward::cxxanyargs::define_method::rb_define_module_function::specific<arity>::define(klass, mid, func)
673
678#define rb_define_global_function(mid, func, arity) ruby::backward::cxxanyargs::define_method::rb_define_global_function::specific<arity>::define(mid, func)
679
680}}}}}
681
682using namespace ruby::backward::cxxanyargs;
683#endif // RUBY_BACKWARD_CXXANYARGS_HPP
#define RUBY_CXX_DEPRECATED(mseg)
Definition: attributes.h:79
unsigned char T
Definition: cls_uchar_va.c:10
#define N
Definition: crc32.c:57
VALUE rb_vrescue2(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*r_proc)(VALUE, VALUE), VALUE data2, va_list args)
An equivalent of rescue clause.
Definition: eval.c:1006
Thin wrapper to ruby/config.h.
Public APIs related to rb_cClass/rb_cModule.
Public APIs related to rb_cFiber.
Public APIs related to rb_cHash.
#define st_foreach_safe
Definition: hash.h:31
Public APIs related to rb_cProc.
Public APIs related to rb_cThread.
Public APIs related to names inside of a Ruby program.
Public APIs related to rb_cRubyVM.
Creation and modification of Ruby methods.
C-function backended Ruby-global variables.
void rb_gvar_setter_t(VALUE val, ID id, VALUE *data)
Definition: variable.h:30
VALUE rb_gvar_getter_t(ID id, VALUE *data)
Definition: variable.h:29
Block related APIs.
rb_block_call_func * rb_block_call_func_t
Definition: iterator.h:34
#define F(x, y, z)
VALUE notimpl_type(int, const VALUE *, VALUE, VALUE)
Type of rb_f_notimplement().
Definition: cxxanyargs.hpp:515
Provides ANYARGS deprecation warnings.
Definition: cxxanyargs.hpp:54
VALUE onearg_type(VALUE)
Single-argumented function type.
Definition: cxxanyargs.hpp:59
VALUE rb_catch_obj(VALUE q, type *w, VALUE e)
An equivalent of Kernel#catch.
Definition: cxxanyargs.hpp:356
VALUE rb_catch(const char *q, type *w, VALUE e)
An equivalent of Kernel#catch.
Definition: cxxanyargs.hpp:329
void rb_define_hooked_variable(const char *q, VALUE *w, type *e, void_type *r)
Define a function-backended global variable.
Definition: cxxanyargs.hpp:136
VALUE rb_thread_create(type *q, void *w)
Creates a rb_cThread instance.
Definition: cxxanyargs.hpp:408
int int_type(ANYARGS)
ANYARGS-ed function type, int variant.
Definition: cxxanyargs.hpp:58
void void_type(ANYARGS)
ANYARGS-ed function type, void variant.
Definition: cxxanyargs.hpp:57
VALUE rb_block_call(VALUE q, ID w, int e, const VALUE *r, type *t, VALUE y)
Call a method with a block.
Definition: cxxanyargs.hpp:230
VALUE rb_proc_new(type *q, VALUE w)
Creates a rb_cProc instance.
Definition: cxxanyargs.hpp:392
VALUE rb_iterate(onearg_type *q, VALUE w, type *e, VALUE r)
Old way to implement iterators.
Definition: cxxanyargs.hpp:204
VALUE type(ANYARGS)
ANYARGS-ed function type.
Definition: cxxanyargs.hpp:56
VALUE rb_fiber_new(type *q, VALUE w)
Creates a rb_cFiber instance.
Definition: cxxanyargs.hpp:376
void rb_hash_foreach(VALUE q, int_type *w, VALUE e)
Iteration over the given hash.
Definition: cxxanyargs.hpp:480
void rb_define_virtual_variable(const char *q, type *w, void_type *e)
Define a function-backended global variable.
Definition: cxxanyargs.hpp:73
void rb_ivar_foreach(VALUE q, int_type *w, VALUE e)
Iteration over each instance variable of the object.
Definition: cxxanyargs.hpp:496
VALUE rb_rescue2(type *q, VALUE w, type *e, VALUE r,...)
An equivalent of rescue clause.
Definition: cxxanyargs.hpp:282
VALUE rb_rescue(type *q, VALUE w, type *e, VALUE r)
An equivalent of rescue clause.
Definition: cxxanyargs.hpp:258
VALUE rb_ensure(type *q, VALUE w, type *e, VALUE r)
An equivalent of ensure clause.
Definition: cxxanyargs.hpp:308
The main namespace.
Definition: cxxanyargs.hpp:37
int argc
Definition: ruby.c:240
char ** argv
Definition: ruby.c:241
#define f
unsigned long st_data_t
Definition: st.h:22
int st_foreach_check_callback_func(st_data_t, st_data_t, st_data_t, int)
Definition: st.h:138
#define st_foreach
Definition: st.h:142
#define st_foreach_check
Definition: st.h:144
int st_foreach_callback_func(st_data_t, st_data_t, st_data_t)
Definition: st.h:137
Defines old _.
#define ANYARGS
Definition: stdarg.h:42
#define const
Definition: strftime.c:108
static void define(T mid, notimpl_type func)
Definition: cxxanyargs.hpp:611
static void define(VALUE klass, T mid, type func)
Defines klass::mid as func, whose arity is N.
Definition: cxxanyargs.hpp:544
static void define(VALUE klass, T mid, U func)
Defines klass::mid as func, whose arity is N.
Definition: cxxanyargs.hpp:554
static void define(VALUE klass, T mid, notimpl_type func)
Defines klass::mid as func, whose arity is N.
Definition: cxxanyargs.hpp:561
Template metaprogramming to generate function prototypes.
Definition: cxxanyargs.hpp:521
Dispatches appropriate driver for rb_define_global_function.
Definition: cxxanyargs.hpp:648
Dispatches appropriate driver for rb_define_method_id.
Definition: cxxanyargs.hpp:643
Dispatches appropriate driver for rb_define_method.
Definition: cxxanyargs.hpp:642
Dispatches appropriate driver for rb_define_module_function.
Definition: cxxanyargs.hpp:647
Dispatches appropriate driver for rb_define_private_method.
Definition: cxxanyargs.hpp:644
Dispatches appropriate driver for rb_define_protected_method.
Definition: cxxanyargs.hpp:645
Dispatches appropriate driver for rb_define_singleton_method.
Definition: cxxanyargs.hpp:646
Definition: st.h:79
#define t
Definition: symbol.c:253
Definition: dtoa.c:302
Defines VALUE and ID.
unsigned long VALUE
Definition: value.h:38
unsigned long ID
Definition: value.h:39