Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
docs: addons: fix NODE_SET_METHOD example
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Oct 28, 2011
1 parent e35ce7b commit 004e6fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/api/addons.markdown
Expand Up @@ -33,13 +33,13 @@ To get started we create a file `hello.cc`:

using namespace v8;

Handle<Value> Method(const Arguments &args) {
Handle<Value> Method(const Arguments& args) {
HandleScope scope;
return String::New("world");
return scope.Close(String::New("world"));
}

void init (Handle<Object> target) {
NODE_SET_METHOD(target, Method);
void init(Handle<Object> target) {
NODE_SET_METHOD(target, "method", Method);
}
NODE_MODULE(hello, init)

Expand Down

0 comments on commit 004e6fb

Please sign in to comment.