Skip to content

Commit 79ce756

Browse files
committed
rename Initialize to InitializeComponent
1 parent c164cf2 commit 79ce756

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

generate/manual/include/wrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Wrapper : public ObjectWrap {
1717
public:
1818

1919
static Persistent<FunctionTemplate> constructor_template;
20-
static void Initialize (Handle<v8::Object> target);
20+
static void InitializeComponent (Handle<v8::Object> target);
2121

2222
void *GetValue();
2323
static Handle<Value> New(void *raw);

generate/manual/src/wrapper.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ Wrapper::Wrapper(void *raw) {
1515
this->raw = raw;
1616
}
1717

18-
void Wrapper::Initialize(Handle<v8::Object> target) {
18+
void Wrapper::InitializeComponent(Handle<v8::Object> target) {
1919
NanScope();
2020

2121
Local<FunctionTemplate> tpl = NanNew<FunctionTemplate>(New);
2222

2323
tpl->InstanceTemplate()->SetInternalFieldCount(1);
2424
tpl->SetClassName(NanNew<String>("Wrapper"));
25-
25+
2626
NODE_SET_PROTOTYPE_METHOD(tpl, "toBuffer", ToBuffer);
2727

2828
NanAssignPersistent(constructor_template, tpl);
@@ -44,12 +44,12 @@ NAN_METHOD(Wrapper::New) {
4444

4545
Handle<Value> Wrapper::New(void *raw) {
4646
NanEscapableScope();
47-
47+
4848
Handle<Value> argv[1] = { NanNew<External>((void *)raw) };
4949
Local<Object> instance;
5050
Local<FunctionTemplate> constructorHandle = NanNew(constructor_template);
5151
instance = constructorHandle->GetFunction()->NewInstance(1, argv);
52-
52+
5353
return NanEscapeScope(instance);
5454
}
5555

@@ -67,7 +67,7 @@ NAN_METHOD(Wrapper::ToBuffer) {
6767
int len = args[0]->ToNumber()->Value();
6868

6969
Local<Function> bufferConstructor = Local<Function>::Cast(
70-
NanGetCurrentContext()->Global()->Get(NanNew<String>("Buffer")));
70+
NanGetCurrentContext()->Global()->Get(NanNew<String>("Buffer")));
7171

7272
Handle<Value> constructorArgs[1] = { NanNew<Integer>(len) };
7373
Local<Object> nodeBuffer = bufferConstructor->NewInstance(1, constructorArgs);

generate/templates/class_content.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ using namespace node;
3838
{%endif%}
3939
}
4040

41-
void {{ cppClassName }}::Initialize(Handle<v8::Object> target) {
41+
void {{ cppClassName }}::InitializeComponent(Handle<v8::Object> target) {
4242
NanScope();
4343

4444
Local<FunctionTemplate> tpl = NanNew<FunctionTemplate>(New);
@@ -98,7 +98,7 @@ Handle<Value> {{ cppClassName }}::New(void *raw, bool selfFreeing) {
9898
return &this->raw;
9999
}
100100
{%else%}
101-
void {{ cppClassName }}::Initialize(Handle<v8::Object> target) {
101+
void {{ cppClassName }}::InitializeComponent(Handle<v8::Object> target) {
102102
NanScope();
103103

104104
Local<Object> object = NanNew<Object>();

generate/templates/class_header.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class {{ cppClassName }} : public ObjectWrap {
3333
public:
3434

3535
static Persistent<Function> constructor_template;
36-
static void Initialize (Handle<v8::Object> target);
36+
static void InitializeComponent (Handle<v8::Object> target);
3737

3838
{%if cType%}
3939
{{ cType }} *GetValue();

generate/templates/nodegit.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
extern "C" void init(Handle<v8::Object> target) {
1313
NanScope();
1414

15-
Wrapper::Initialize(target);
15+
Wrapper::InitializeComponent(target);
1616
{%each%}
17-
{{ cppClassName }}::Initialize(target);
17+
{{ cppClassName }}::InitializeComponent(target);
1818
{%endeach%}
1919
}
2020

generate/templates/struct_content.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void {{ cppClassName }}::ConstructFields() {
7575
{%endeach%}
7676
}
7777

78-
void {{ cppClassName }}::Initialize(Handle<v8::Object> target) {
78+
void {{ cppClassName }}::InitializeComponent(Handle<v8::Object> target) {
7979
NanScope();
8080

8181
Local<FunctionTemplate> tpl = NanNew<FunctionTemplate>(New);

generate/templates/struct_header.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class {{ cppClassName }} : public ObjectWrap {
2222
public:
2323
{{ cppClassName }}({{ cType }}* raw, bool selfFreeing);
2424
static Persistent<Function> constructor_template;
25-
static void Initialize (Handle<v8::Object> target);
25+
static void InitializeComponent (Handle<v8::Object> target);
2626

2727
{{ cType }} *GetValue();
2828
{{ cType }} **GetRefValue();

0 commit comments

Comments
 (0)