Sha256: 3f9c055388f4ce222dc381a62fec36bff66de478f48a2f93e4cdc75a95782408

Contents?: true

Size: 944 Bytes

Versions: 1

Compression:

Stored size: 944 Bytes

Contents

#include "rr.h"

using namespace v8;

namespace {

  VALUE IsDead(VALUE self) {
    return rr_v82rb(V8::IsDead());
  }

  VALUE AdjustAmountOfExternalAllocatedMemory(VALUE self, VALUE bytes) {
    V8::AdjustAmountOfExternalAllocatedMemory(NUM2INT(bytes));
    return Qnil;
  }

   VALUE IdleNotification(VALUE self) {
     return rr_v82rb(V8::IdleNotification());
   }

  VALUE SetFlagsFromString(VALUE self, VALUE string) {
    V8::SetFlagsFromString(RSTRING_PTR(string), (int)RSTRING_LEN(string));
    return Qnil;
  }
}


void rr_init_v8_v8() {
  VALUE V8Module = rr_define_module("V8");
  rr_define_singleton_method(V8Module, "IsDead", IsDead, 0);
  rr_define_singleton_method(V8Module, "AdjustAmountOfExternalAllocatedMemory", AdjustAmountOfExternalAllocatedMemory, 1);
  rr_define_singleton_method(V8Module, "IdleNotification", IdleNotification, 0);
  rr_define_singleton_method(V8Module, "SetFlagsFromString", SetFlagsFromString, 1);
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
therubyracer-freebsd-0.10.1 ext/v8/v8_v8.cpp