From aa35564ca1c9f3854bc5f7983f2f00cb51f67ffe Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Sat, 25 Feb 2012 11:18:45 -0800 Subject: Use NODE_MODULE in the hello-world addon example. Fixes Windows throwing "unknown error" when trying to require the .node file. --- test/addons/hello-world/binding.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'test/addons/hello-world') diff --git a/test/addons/hello-world/binding.cc b/test/addons/hello-world/binding.cc index 82e8c5583d..424fad8445 100644 --- a/test/addons/hello-world/binding.cc +++ b/test/addons/hello-world/binding.cc @@ -3,10 +3,6 @@ using namespace v8; -extern "C" { - void init(Handle target); -} - Handle Method(const Arguments& args) { HandleScope scope; return scope.Close(String::New("world")); @@ -15,3 +11,5 @@ Handle Method(const Arguments& args) { void init(Handle target) { NODE_SET_METHOD(target, "hello", Method); } + +NODE_MODULE(binding, init); -- cgit v1.2.1