mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
add stub for Object::SetAccessor()
This commit is contained in:
parent
dd12601032
commit
28475caab3
3 changed files with 13 additions and 2 deletions
|
|
@ -23,7 +23,10 @@ namespace rr {
|
|||
VALUE superclass = defineClass(supername);
|
||||
this->value = defineClass(name, superclass);
|
||||
}
|
||||
|
||||
ClassBuilder& ClassBuilder::defineMethod(const char* name, VALUE (*impl)(int, VALUE*, VALUE)) {
|
||||
rb_define_method(this->value, name, (VALUE (*)(...))impl, -1);
|
||||
return *this;
|
||||
}
|
||||
ClassBuilder& ClassBuilder::defineMethod(const char* name, VALUE (*impl)(VALUE)) {
|
||||
rb_define_method(this->value, name, (VALUE (*)(...))impl, 0);
|
||||
return *this;
|
||||
|
|
@ -36,6 +39,10 @@ namespace rr {
|
|||
rb_define_method(this->value, name, (VALUE (*)(...))impl, 2);
|
||||
return *this;
|
||||
}
|
||||
ClassBuilder& ClassBuilder::defineSingletonMethod(const char* name, VALUE (*impl)(int, VALUE*, VALUE)) {
|
||||
rb_define_singleton_method(this->value, name, (VALUE (*)(...))impl, -1);
|
||||
return *this;
|
||||
}
|
||||
ClassBuilder& ClassBuilder::defineSingletonMethod(const char* name, VALUE (*impl)(VALUE)) {
|
||||
rb_define_singleton_method(this->value, name, (VALUE (*)(...))impl, 0);
|
||||
return *this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue