From 004e6fbe1f833523caf262e07577cbdeb4324c9b Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 28 Oct 2011 22:36:55 +0200 Subject: [PATCH] docs: addons: fix NODE_SET_METHOD example --- doc/api/addons.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/addons.markdown b/doc/api/addons.markdown index 6b54069..f4009cb 100644 --- a/doc/api/addons.markdown +++ b/doc/api/addons.markdown @@ -33,13 +33,13 @@ To get started we create a file `hello.cc`: using namespace v8; - Handle Method(const Arguments &args) { + Handle Method(const Arguments& args) { HandleScope scope; - return String::New("world"); + return scope.Close(String::New("world")); } - void init (Handle target) { - NODE_SET_METHOD(target, Method); + void init(Handle target) { + NODE_SET_METHOD(target, "method", Method); } NODE_MODULE(hello, init) -- 2.7.4