summaryrefslogtreecommitdiff
path: root/benchmark/misc/function_call/binding.cc
blob: 6ea928464c2aabb3db17891b91f60f572ff048ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <v8.h>
#include <node.h>

using namespace v8;

static int c = 0;

static Handle<Value> Hello(const Arguments& args) {
  HandleScope scope;
  return scope.Close(Integer::New(c++));
}

extern "C" void init (Handle<Object> target) {
  HandleScope scope;
  NODE_SET_METHOD(target, "hello", Hello);
}

NODE_MODULE(binding, init);