mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
provide handle scopes to value methods
This commit is contained in:
parent
2d54f65b8d
commit
ded96b7847
1 changed files with 27 additions and 0 deletions
|
@ -8,88 +8,115 @@ namespace {
|
||||||
return V8_Ref_Get<Value>(value);
|
return V8_Ref_Get<Value>(value);
|
||||||
}
|
}
|
||||||
VALUE IsUndefined(VALUE self) {
|
VALUE IsUndefined(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->IsUndefined());
|
return rr_v82rb(unwrap(self)->IsUndefined());
|
||||||
}
|
}
|
||||||
VALUE IsNull(VALUE self) {
|
VALUE IsNull(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->IsNull());
|
return rr_v82rb(unwrap(self)->IsNull());
|
||||||
}
|
}
|
||||||
VALUE IsTrue(VALUE self) {
|
VALUE IsTrue(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->IsTrue());
|
return rr_v82rb(unwrap(self)->IsTrue());
|
||||||
}
|
}
|
||||||
VALUE IsFalse(VALUE self) {
|
VALUE IsFalse(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->IsFalse());
|
return rr_v82rb(unwrap(self)->IsFalse());
|
||||||
}
|
}
|
||||||
VALUE IsString(VALUE self) {
|
VALUE IsString(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->IsString());
|
return rr_v82rb(unwrap(self)->IsString());
|
||||||
}
|
}
|
||||||
VALUE IsFunction(VALUE self) {
|
VALUE IsFunction(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->IsFunction());
|
return rr_v82rb(unwrap(self)->IsFunction());
|
||||||
}
|
}
|
||||||
VALUE IsArray(VALUE self) {
|
VALUE IsArray(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->IsArray());
|
return rr_v82rb(unwrap(self)->IsArray());
|
||||||
}
|
}
|
||||||
VALUE IsObject(VALUE self) {
|
VALUE IsObject(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->IsObject());
|
return rr_v82rb(unwrap(self)->IsObject());
|
||||||
}
|
}
|
||||||
VALUE IsBoolean(VALUE self) {
|
VALUE IsBoolean(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->IsBoolean());
|
return rr_v82rb(unwrap(self)->IsBoolean());
|
||||||
}
|
}
|
||||||
VALUE IsNumber(VALUE self) {
|
VALUE IsNumber(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->IsNumber());
|
return rr_v82rb(unwrap(self)->IsNumber());
|
||||||
}
|
}
|
||||||
VALUE IsExternal(VALUE self) {
|
VALUE IsExternal(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->IsExternal());
|
return rr_v82rb(unwrap(self)->IsExternal());
|
||||||
}
|
}
|
||||||
VALUE IsInt32(VALUE self) {
|
VALUE IsInt32(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->IsInt32());
|
return rr_v82rb(unwrap(self)->IsInt32());
|
||||||
}
|
}
|
||||||
VALUE IsUint32(VALUE self) {
|
VALUE IsUint32(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->IsUint32());
|
return rr_v82rb(unwrap(self)->IsUint32());
|
||||||
}
|
}
|
||||||
VALUE IsDate(VALUE self) {
|
VALUE IsDate(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->IsDate());
|
return rr_v82rb(unwrap(self)->IsDate());
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE ToBoolean(VALUE self) {
|
VALUE ToBoolean(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->ToBoolean());
|
return rr_v82rb(unwrap(self)->ToBoolean());
|
||||||
}
|
}
|
||||||
VALUE ToNumber(VALUE self) {
|
VALUE ToNumber(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->ToNumber());
|
return rr_v82rb(unwrap(self)->ToNumber());
|
||||||
}
|
}
|
||||||
VALUE ToString(VALUE self) {
|
VALUE ToString(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->ToString());
|
return rr_v82rb(unwrap(self)->ToString());
|
||||||
}
|
}
|
||||||
VALUE ToDetailString(VALUE self) {
|
VALUE ToDetailString(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->ToDetailString());
|
return rr_v82rb(unwrap(self)->ToDetailString());
|
||||||
}
|
}
|
||||||
VALUE ToObject(VALUE self) {
|
VALUE ToObject(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->ToObject());
|
return rr_v82rb(unwrap(self)->ToObject());
|
||||||
}
|
}
|
||||||
VALUE ToInteger(VALUE self) {
|
VALUE ToInteger(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->ToInteger());
|
return rr_v82rb(unwrap(self)->ToInteger());
|
||||||
}
|
}
|
||||||
VALUE ToUint32(VALUE self) {
|
VALUE ToUint32(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->ToUint32());
|
return rr_v82rb(unwrap(self)->ToUint32());
|
||||||
}
|
}
|
||||||
VALUE ToInt32(VALUE self) {
|
VALUE ToInt32(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->ToInt32());
|
return rr_v82rb(unwrap(self)->ToInt32());
|
||||||
}
|
}
|
||||||
VALUE ToArrayIndex(VALUE self) {
|
VALUE ToArrayIndex(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->ToArrayIndex());
|
return rr_v82rb(unwrap(self)->ToArrayIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE Equals(VALUE self, VALUE that) {
|
VALUE Equals(VALUE self, VALUE that) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->Equals(unwrap(that)));
|
return rr_v82rb(unwrap(self)->Equals(unwrap(that)));
|
||||||
}
|
}
|
||||||
VALUE StrictEquals(VALUE self, VALUE that) {
|
VALUE StrictEquals(VALUE self, VALUE that) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->StrictEquals(unwrap(that)));
|
return rr_v82rb(unwrap(self)->StrictEquals(unwrap(that)));
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE BooleanValue(VALUE self) {
|
VALUE BooleanValue(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->BooleanValue());
|
return rr_v82rb(unwrap(self)->BooleanValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE NumberValue(VALUE self) {
|
VALUE NumberValue(VALUE self) {
|
||||||
|
HandleScope scope;
|
||||||
return rr_v82rb(unwrap(self)->NumberValue());
|
return rr_v82rb(unwrap(self)->NumberValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue