forked from lihaochen910/mrubybind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmrubybind_call_generated.h
77 lines (56 loc) · 5.5 KB
/
mrubybind_call_generated.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// This file is generated from gen_template.rb
#define ARG(mrb, i) Type<P##i>::get(mrb, args[i])
#define CHECK(i) {if(!Type<P##i>::check(mrb, args[i])) return RAISE(i);}
#define RAISE(i) raise(mrb, i, Type<P##i>::TYPE_NAME, args[i])
template<class P0>MrubyRef call(std::string name, P0 a0){
MrubyArenaStore mas(mrb);
//(void)(narg); CHECK(0);
return MrubyRef(mrb, mrb_funcall(mrb, *(this->v.get()), name.c_str(), 1, Type<P0>::ret(mrb, a0)));
}
template<class P0, class P1>MrubyRef call(std::string name, P0 a0, P1 a1){
MrubyArenaStore mas(mrb);
//(void)(narg); CHECK(0); (void)(narg); CHECK(1);
return MrubyRef(mrb, mrb_funcall(mrb, *(this->v.get()), name.c_str(), 2, Type<P0>::ret(mrb, a0), Type<P1>::ret(mrb, a1)));
}
template<class P0, class P1, class P2>MrubyRef call(std::string name, P0 a0, P1 a1, P2 a2){
MrubyArenaStore mas(mrb);
//(void)(narg); CHECK(0); (void)(narg); CHECK(1); (void)(narg); CHECK(2);
return MrubyRef(mrb, mrb_funcall(mrb, *(this->v.get()), name.c_str(), 3, Type<P0>::ret(mrb, a0), Type<P1>::ret(mrb, a1), Type<P2>::ret(mrb, a2)));
}
template<class P0, class P1, class P2, class P3>MrubyRef call(std::string name, P0 a0, P1 a1, P2 a2, P3 a3){
MrubyArenaStore mas(mrb);
//(void)(narg); CHECK(0); (void)(narg); CHECK(1); (void)(narg); CHECK(2); (void)(narg); CHECK(3);
return MrubyRef(mrb, mrb_funcall(mrb, *(this->v.get()), name.c_str(), 4, Type<P0>::ret(mrb, a0), Type<P1>::ret(mrb, a1), Type<P2>::ret(mrb, a2), Type<P3>::ret(mrb, a3)));
}
template<class P0, class P1, class P2, class P3, class P4>MrubyRef call(std::string name, P0 a0, P1 a1, P2 a2, P3 a3, P4 a4){
MrubyArenaStore mas(mrb);
//(void)(narg); CHECK(0); (void)(narg); CHECK(1); (void)(narg); CHECK(2); (void)(narg); CHECK(3); (void)(narg); CHECK(4);
return MrubyRef(mrb, mrb_funcall(mrb, *(this->v.get()), name.c_str(), 5, Type<P0>::ret(mrb, a0), Type<P1>::ret(mrb, a1), Type<P2>::ret(mrb, a2), Type<P3>::ret(mrb, a3), Type<P4>::ret(mrb, a4)));
}
template<class P0, class P1, class P2, class P3, class P4, class P5>MrubyRef call(std::string name, P0 a0, P1 a1, P2 a2, P3 a3, P4 a4, P5 a5){
MrubyArenaStore mas(mrb);
//(void)(narg); CHECK(0); (void)(narg); CHECK(1); (void)(narg); CHECK(2); (void)(narg); CHECK(3); (void)(narg); CHECK(4); (void)(narg); CHECK(5);
return MrubyRef(mrb, mrb_funcall(mrb, *(this->v.get()), name.c_str(), 6, Type<P0>::ret(mrb, a0), Type<P1>::ret(mrb, a1), Type<P2>::ret(mrb, a2), Type<P3>::ret(mrb, a3), Type<P4>::ret(mrb, a4), Type<P5>::ret(mrb, a5)));
}
template<class P0, class P1, class P2, class P3, class P4, class P5, class P6>MrubyRef call(std::string name, P0 a0, P1 a1, P2 a2, P3 a3, P4 a4, P5 a5, P6 a6){
MrubyArenaStore mas(mrb);
//(void)(narg); CHECK(0); (void)(narg); CHECK(1); (void)(narg); CHECK(2); (void)(narg); CHECK(3); (void)(narg); CHECK(4); (void)(narg); CHECK(5); (void)(narg); CHECK(6);
return MrubyRef(mrb, mrb_funcall(mrb, *(this->v.get()), name.c_str(), 7, Type<P0>::ret(mrb, a0), Type<P1>::ret(mrb, a1), Type<P2>::ret(mrb, a2), Type<P3>::ret(mrb, a3), Type<P4>::ret(mrb, a4), Type<P5>::ret(mrb, a5), Type<P6>::ret(mrb, a6)));
}
template<class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7>MrubyRef call(std::string name, P0 a0, P1 a1, P2 a2, P3 a3, P4 a4, P5 a5, P6 a6, P7 a7){
MrubyArenaStore mas(mrb);
//(void)(narg); CHECK(0); (void)(narg); CHECK(1); (void)(narg); CHECK(2); (void)(narg); CHECK(3); (void)(narg); CHECK(4); (void)(narg); CHECK(5); (void)(narg); CHECK(6); (void)(narg); CHECK(7);
return MrubyRef(mrb, mrb_funcall(mrb, *(this->v.get()), name.c_str(), 8, Type<P0>::ret(mrb, a0), Type<P1>::ret(mrb, a1), Type<P2>::ret(mrb, a2), Type<P3>::ret(mrb, a3), Type<P4>::ret(mrb, a4), Type<P5>::ret(mrb, a5), Type<P6>::ret(mrb, a6), Type<P7>::ret(mrb, a7)));
}
template<class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8>MrubyRef call(std::string name, P0 a0, P1 a1, P2 a2, P3 a3, P4 a4, P5 a5, P6 a6, P7 a7, P8 a8){
MrubyArenaStore mas(mrb);
//(void)(narg); CHECK(0); (void)(narg); CHECK(1); (void)(narg); CHECK(2); (void)(narg); CHECK(3); (void)(narg); CHECK(4); (void)(narg); CHECK(5); (void)(narg); CHECK(6); (void)(narg); CHECK(7); (void)(narg); CHECK(8);
return MrubyRef(mrb, mrb_funcall(mrb, *(this->v.get()), name.c_str(), 9, Type<P0>::ret(mrb, a0), Type<P1>::ret(mrb, a1), Type<P2>::ret(mrb, a2), Type<P3>::ret(mrb, a3), Type<P4>::ret(mrb, a4), Type<P5>::ret(mrb, a5), Type<P6>::ret(mrb, a6), Type<P7>::ret(mrb, a7), Type<P8>::ret(mrb, a8)));
}
template<class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9>MrubyRef call(std::string name, P0 a0, P1 a1, P2 a2, P3 a3, P4 a4, P5 a5, P6 a6, P7 a7, P8 a8, P9 a9){
MrubyArenaStore mas(mrb);
//(void)(narg); CHECK(0); (void)(narg); CHECK(1); (void)(narg); CHECK(2); (void)(narg); CHECK(3); (void)(narg); CHECK(4); (void)(narg); CHECK(5); (void)(narg); CHECK(6); (void)(narg); CHECK(7); (void)(narg); CHECK(8); (void)(narg); CHECK(9);
return MrubyRef(mrb, mrb_funcall(mrb, *(this->v.get()), name.c_str(), 10, Type<P0>::ret(mrb, a0), Type<P1>::ret(mrb, a1), Type<P2>::ret(mrb, a2), Type<P3>::ret(mrb, a3), Type<P4>::ret(mrb, a4), Type<P5>::ret(mrb, a5), Type<P6>::ret(mrb, a6), Type<P7>::ret(mrb, a7), Type<P8>::ret(mrb, a8), Type<P9>::ret(mrb, a9)));
}
#undef ARG
#undef CHECK