Having semicolons there runs counter to our documentation and illicits warnings in pedantic mode. This removes semicolons from after uses of NODE_MODULE and NODE_MODULE_CONTEXT_AWARE_BUILTIN. PR-URL: https://github.com/nodejs/node/pull/12919 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
17 lines
329 B
C++
17 lines
329 B
C++
#include <v8.h>
|
|
#include <node.h>
|
|
|
|
using namespace v8;
|
|
|
|
static int c = 0;
|
|
|
|
void Hello(const FunctionCallbackInfo<Value>& args) {
|
|
args.GetReturnValue().Set(c++);
|
|
}
|
|
|
|
extern "C" void init (Local<Object> target) {
|
|
HandleScope scope(Isolate::GetCurrent());
|
|
NODE_SET_METHOD(target, "hello", Hello);
|
|
}
|
|
|
|
NODE_MODULE(binding, init)
|