99#include < node.h>
1010#include < string>
1111
12+ #include " nan.h"
13+
1214#include " git2.h"
1315
1416using namespace node ;
@@ -17,7 +19,7 @@ using namespace v8;
1719class GitDiff : public ObjectWrap {
1820 public:
1921
20- static Persistent<Function > constructor_template;
22+ static Persistent<FunctionTemplate > constructor_template;
2123 static void Initialize (Handle<v8::Object> target);
2224
2325 git_diff_list *GetValue ();
@@ -26,10 +28,10 @@ class GitDiff : public ObjectWrap {
2628 GitDiff (git_diff_list *raw);
2729 ~GitDiff ();
2830
29- static Handle<Value> New ( const Arguments& args );
31+ static NAN_METHOD (New );
3032
33+ static NAN_METHOD (TreeToTree);
3134
32- static Handle<Value> TreeToTree (const Arguments& args);
3335 static void TreeToTreeWork (uv_work_t * req);
3436 static void TreeToTreeAfterWork (uv_work_t * req);
3537
@@ -47,7 +49,7 @@ class GitDiff : public ObjectWrap {
4749 const git_diff_options * opts;
4850 Persistent<Function> callback;
4951 };
50- static Handle<Value> TreeToIndex ( const Arguments& args );
52+ static NAN_METHOD (TreeToIndex );
5153 static void TreeToIndexWork (uv_work_t * req);
5254 static void TreeToIndexAfterWork (uv_work_t * req);
5355
@@ -65,7 +67,7 @@ class GitDiff : public ObjectWrap {
6567 const git_diff_options * opts;
6668 Persistent<Function> callback;
6769 };
68- static Handle<Value> IndexToWorkdir ( const Arguments& args );
70+ static NAN_METHOD (IndexToWorkdir );
6971 static void IndexToWorkdirWork (uv_work_t * req);
7072 static void IndexToWorkdirAfterWork (uv_work_t * req);
7173
@@ -81,7 +83,7 @@ class GitDiff : public ObjectWrap {
8183 const git_diff_options * opts;
8284 Persistent<Function> callback;
8385 };
84- static Handle<Value> TreeToWorkdir ( const Arguments& args );
86+ static NAN_METHOD (TreeToWorkdir );
8587 static void TreeToWorkdirWork (uv_work_t * req);
8688 static void TreeToWorkdirAfterWork (uv_work_t * req);
8789
@@ -97,12 +99,12 @@ class GitDiff : public ObjectWrap {
9799 const git_diff_options * opts;
98100 Persistent<Function> callback;
99101 };
100- static Handle<Value> Merge ( const Arguments& args );
101- static Handle<Value> FindSimilar ( const Arguments& args );
102- static Handle<Value> StatusChar ( const Arguments& args );
103- static Handle<Value> NumDeltas ( const Arguments& args );
104- static Handle<Value> NumDeltasOfType ( const Arguments& args );
105- static Handle<Value> GetPatch ( const Arguments& args );
102+ static NAN_METHOD (Merge );
103+ static NAN_METHOD (FindSimilar );
104+ static NAN_METHOD (StatusChar );
105+ static NAN_METHOD (NumDeltas );
106+ static NAN_METHOD (NumDeltasOfType );
107+ static NAN_METHOD (GetPatch );
106108 git_diff_list *raw;
107109};
108110
0 commit comments