projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f1f2d1
)
Use NODE_MODULE in the hello-world addon example.
author
Nathan Rajlich
<nathan@tootallnate.net>
Sat, 25 Feb 2012 19:18:45 +0000
(11:18 -0800)
committer
Ben Noordhuis
<info@bnoordhuis.nl>
Mon, 27 Feb 2012 01:44:33 +0000
(
02:44
+0100)
Fixes Windows throwing "unknown error" when trying to require the .node file.
test/addons/hello-world/binding.cc
patch
|
blob
|
history
diff --git
a/test/addons/hello-world/binding.cc
b/test/addons/hello-world/binding.cc
index 82e8c5583dae82ffd0a8466c09311bc4e096513b..424fad8445add651ae7c50a248979e11d665d8c1 100644
(file)
--- 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<Object> target);
-}
-
Handle<Value> Method(const Arguments& args) {
HandleScope scope;
return scope.Close(String::New("world"));
@@
-15,3
+11,5
@@
Handle<Value> Method(const Arguments& args) {
void init(Handle<Object> target) {
NODE_SET_METHOD(target, "hello", Method);
}
+
+NODE_MODULE(binding, init);