Skip to content

Commit

Permalink
fix registration for node 0.10.0. Refs creationixgh-39
Browse files Browse the repository at this point in the history
  • Loading branch information
k2052 committed Jan 25, 2014
1 parent d41c97c commit a305015
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions src/init.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@
#include "util.h"
#include "namespace_loader.h"

extern "C" void init (v8::Handle<v8::Object> target) {
v8::HandleScope scope;
using namespace node;
using namespace v8;

NODE_SET_METHOD(target, "init", init);
gir::NamespaceLoader::Initialize(target);
extern "C" void
init(Handle<Object> target) {
HandleScope scope;

NODE_SET_METHOD(target, "init", g_init);
gir::NamespaceLoader::Initialize(target);
}

NODE_MODULE(girepository, init);
2 changes: 1 addition & 1 deletion src/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <glib.h>
#include <girepository.h>

v8::Handle<v8::Value> init(const v8::Arguments &args) {
v8::Handle<v8::Value> g_init(const v8::Arguments &args) {
v8::HandleScope scope;
g_type_init();
return scope.Close(v8::Undefined());
Expand Down

0 comments on commit a305015

Please sign in to comment.