1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00
therubyracer/v8_cxt.cpp
2009-12-07 09:54:20 +02:00

18 lines
360 B
C++

#include "v8_cxt.h"
#include "ruby.h"
#include "stdio.h"
using namespace v8;
v8_cxt::v8_cxt() : v8_ref<Context>(Context::New()) {
printf("Allocate Native V8 Context\n");
}
VALUE v8_cxt_allocate(VALUE clazz) {
printf("This is the big leagues chew!\n");
v8_cxt* cxt = new v8_cxt();
return Data_Wrap_Struct(clazz, v8_ref_mark , v8_ref_free, cxt);
}