1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

expose the C::Object#GetIdentityHash()

This commit is contained in:
Charles Lowell 2011-05-10 09:36:33 -05:00
parent d4c7cca6fc
commit f6b68429b1

View file

@ -52,6 +52,9 @@ namespace {
Local<Value> names = object->GetPropertyNames(); Local<Value> names = object->GetPropertyNames();
return rr_v82rb(names); return rr_v82rb(names);
} }
VALUE GetIdentityHash(VALUE self) {
return rr_v82rb(unwrap(self)->GetIdentityHash());
}
VALUE SetHiddenValue(VALUE self, VALUE key, VALUE value) { VALUE SetHiddenValue(VALUE self, VALUE key, VALUE value) {
HandleScope scope; HandleScope scope;
if (Context::InContext()) { if (Context::InContext()) {
@ -86,6 +89,7 @@ void rr_init_object() {
rr_define_method(ObjectClass, "Get", Get, 1); rr_define_method(ObjectClass, "Get", Get, 1);
rr_define_method(ObjectClass, "Set", Set, 2); rr_define_method(ObjectClass, "Set", Set, 2);
rr_define_method(ObjectClass, "GetPropertyNames", GetPropertyNames, 0); rr_define_method(ObjectClass, "GetPropertyNames", GetPropertyNames, 0);
rr_define_method(ObjectClass, "GetIdentityHash", GetIdentityHash, 0);
rr_define_method(ObjectClass, "GetHiddenValue", GetHiddenValue, 1); rr_define_method(ObjectClass, "GetHiddenValue", GetHiddenValue, 1);
rr_define_method(ObjectClass, "SetHiddenValue", SetHiddenValue, 2); rr_define_method(ObjectClass, "SetHiddenValue", SetHiddenValue, 2);
rr_define_method(ObjectClass, "GetPrototype", GetPrototype, 0); rr_define_method(ObjectClass, "GetPrototype", GetPrototype, 0);