mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
d1e9088cf0
You can now create a JS object from Ruby-land without segfaulting
29 lines
446 B
C++
29 lines
446 B
C++
#ifndef RR_BACKREF
|
|
#define RR_BACKREF
|
|
|
|
namespace rr {
|
|
|
|
class Backref {
|
|
public:
|
|
static void Init();
|
|
|
|
Backref(VALUE value);
|
|
|
|
virtual ~Backref();
|
|
|
|
VALUE get();
|
|
VALUE set(VALUE value);
|
|
|
|
v8::Handle<v8::External> toExternal();
|
|
|
|
static void release(const v8::WeakCallbackData<v8::External, Backref>& data);
|
|
private:
|
|
VALUE storage;
|
|
static VALUE Storage;
|
|
static ID _new;
|
|
static ID object;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|