File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class Wrapper : public ObjectWrap {
2525 private:
2626 Wrapper (void *raw);
2727
28- static NAN_METHOD (New );
28+ static NAN_METHOD (JSNewFunction );
2929 static NAN_METHOD (ToBuffer);
3030
3131 void *raw;
Original file line number Diff line number Diff line change 22 * This code is auto-generated; unless you know what you're doing, do not modify!
33 **/
44#include < nan.h>
5+ #include < node.h>
56#include < string>
67#include < cstring>
78
@@ -18,7 +19,7 @@ Wrapper::Wrapper(void *raw) {
1819void Wrapper::InitializeComponent (Handle<v8::Object> target) {
1920 NanScope ();
2021
21- Local<FunctionTemplate> tpl = NanNew<FunctionTemplate>(New );
22+ Local<FunctionTemplate> tpl = NanNew<FunctionTemplate>(JSNewFunction );
2223
2324 tpl->InstanceTemplate ()->SetInternalFieldCount (1 );
2425 tpl->SetClassName (NanNew<String>(" Wrapper" ));
@@ -29,7 +30,7 @@ void Wrapper::InitializeComponent(Handle<v8::Object> target) {
2930 target->Set (NanNew<String>(" Wrapper" ), tpl->GetFunction ());
3031}
3132
32- NAN_METHOD (Wrapper::New ) {
33+ NAN_METHOD (Wrapper::JSNewFunction ) {
3334 NanScope ();
3435
3536 if (args.Length () == 0 || !args[0 ]->IsExternal ()) {
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ using namespace node;
4141 void {{ cppClassName }}::InitializeComponent(Handle<v8::Object> target) {
4242 NanScope ();
4343
44- Local<FunctionTemplate> tpl = NanNew<FunctionTemplate>(New );
44+ Local<FunctionTemplate> tpl = NanNew<FunctionTemplate>(JSNewFunction );
4545
4646 tpl->InstanceTemplate ()->SetInternalFieldCount (1 );
4747 tpl->SetClassName (NanNew<String>(" {{ jsClassName }}" ));
@@ -67,7 +67,7 @@ using namespace node;
6767 target->Set (NanNew<String>(" {{ jsClassName }}" ), _constructor_template);
6868 }
6969
70- NAN_METHOD ({{ cppClassName }}::New ) {
70+ NAN_METHOD ({{ cppClassName }}::JSNewFunction ) {
7171 NanScope ();
7272
7373 if (args.Length () == 0 || !args[0 ]->IsExternal ()) {
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class {{ cppClassName }} : public ObjectWrap {
4949 ~{{ cppClassName }}();
5050 {%endif%}
5151
52- static NAN_METHOD (New );
52+ static NAN_METHOD (JSNewFunction );
5353
5454 {%each fields as field%}
5555 {%if not field.ignore %}
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ void {{ cppClassName }}::ConstructFields() {
7979void {{ cppClassName }}::InitializeComponent(Handle<v8::Object> target) {
8080 NanScope ();
8181
82- Local<FunctionTemplate> tpl = NanNew<FunctionTemplate>(New );
82+ Local<FunctionTemplate> tpl = NanNew<FunctionTemplate>(JSNewFunction );
8383
8484 tpl->InstanceTemplate ()->SetInternalFieldCount (1 );
8585 tpl->SetClassName (NanNew<String>(" {{ jsClassName }}" ));
@@ -95,7 +95,7 @@ void {{ cppClassName }}::InitializeComponent(Handle<v8::Object> target) {
9595 target->Set (NanNew<String>(" {{ jsClassName }}" ), _constructor_template);
9696}
9797
98- NAN_METHOD ({{ cppClassName }}::New ) {
98+ NAN_METHOD ({{ cppClassName }}::JSNewFunction ) {
9999 NanScope ();
100100 {{ cppClassName }}* instance;
101101
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ class {{ cppClassName }} : public ObjectWrap {
6666
6767 void ConstructFields ();
6868
69- static NAN_METHOD (New );
69+ static NAN_METHOD (JSNewFunction );
7070
7171 {% each fields as field %}
7272 {% if not field.ignore %}
Original file line number Diff line number Diff line change 7373 "js-beautify" : " ^1.5.4" ,
7474 "jshint" : " ~2.5.6" ,
7575 "lodash" : " ^2.4.1" ,
76- "nan" : " ~1.4.1 " ,
76+ "nan" : " ~1.5.0 " ,
7777 "node-gyp" : " ~1.0.2" ,
7878 "nw-gyp" : " ^0.12.4" ,
7979 "request" : " ~2.51.0" ,
You can’t perform that action at this time.
0 commit comments