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

24 lines
424 B
C++
Raw Normal View History

#include "rr.h"
namespace rr {
void Isolate::Init() {
ClassBuilder("Isolate").
defineSingletonMethod("New", &New).
defineMethod("Equals", &rr::Isolate::PointerEquals).
store(&Class);
}
VALUE Isolate::New(VALUE self) {
return Isolate(v8::Isolate::New());
}
template <>
void Pointer<v8::Isolate>::unwrap(VALUE value) {
Data_Get_Struct(value, class v8::Isolate, pointer);
}
}