@@ -18,18 +18,18 @@ using namespace v8;
1818using namespace node ;
1919
2020void GitTreeEntry::Initialize (Handle<v8::Object> target) {
21- Local<FunctionTemplate> t = FunctionTemplate::New (New);
21+ Local<FunctionTemplate> tpl = FunctionTemplate::New (New);
2222
23- constructor_template = Persistent<FunctionTemplate>::New (t);
24- constructor_template->InstanceTemplate ()->SetInternalFieldCount (1 );
25- constructor_template->SetClassName (String::NewSymbol (" TreeEntry" ));
23+ tpl->InstanceTemplate ()->SetInternalFieldCount (1 );
24+ tpl->SetClassName (String::NewSymbol (" TreeEntry" ));
2625
27- NODE_SET_PROTOTYPE_METHOD (constructor_template , " name" , Name);
28- NODE_SET_PROTOTYPE_METHOD (constructor_template , " attributes" , Attributes);
29- NODE_SET_PROTOTYPE_METHOD (constructor_template , " id" , Id);
30- NODE_SET_PROTOTYPE_METHOD (constructor_template , " toObject" , ToObject);
26+ NODE_SET_PROTOTYPE_METHOD (tpl , " name" , Name);
27+ NODE_SET_PROTOTYPE_METHOD (tpl , " attributes" , Attributes);
28+ NODE_SET_PROTOTYPE_METHOD (tpl , " id" , Id);
29+ NODE_SET_PROTOTYPE_METHOD (tpl , " toObject" , ToObject);
3130
32- target->Set (String::NewSymbol (" TreeEntry" ), constructor_template->GetFunction ());
31+ constructor_template = Persistent<Function>::New (tpl->GetFunction ());
32+ target->Set (String::NewSymbol (" TreeEntry" ), constructor_template);
3333}
3434
3535git_tree_entry* GitTreeEntry::GetValue () {
@@ -63,7 +63,7 @@ Handle<Value> GitTreeEntry::New(const Arguments& args) {
6363
6464 entry->Wrap (args.This ());
6565
66- return scope.Close ( args.This () );
66+ return scope.Close (args.This ());
6767}
6868
6969Handle<Value> GitTreeEntry::Name (const Arguments& args) {
@@ -121,5 +121,5 @@ Handle<Value> GitTreeEntry::ToObject(const Arguments& args) {
121121
122122 return scope.Close ( Undefined () );
123123}
124- Persistent<FunctionTemplate > GitTreeEntry::constructor_template;
124+ Persistent<Function > GitTreeEntry::constructor_template;
125125
0 commit comments