Permalink
Browse files

Updates for node 0.0.6x

  • Loading branch information...
1 parent 101195a commit a93d5f199f850ac169dcf6fa266fcd3216be2b4c @moneal moneal committed Dec 9, 2011
View
@@ -137,7 +137,7 @@ class GitBlob : public ObjectWrap {
* Returns:
* completion code integer
*/
- static int EIO_Lookup(eio_req* req);
+ static void EIO_Lookup(eio_req* req);
/**
* Function: EIO_AfterLookup
*
View
@@ -8,7 +8,6 @@
#include <v8.h>
#include <node.h>
-#include <node_events.h>
#include "../vendor/libgit2/include/git2.h"
@@ -23,7 +22,7 @@ using namespace v8;
/**
* Class wrapper for libgit2 git_commit
*/
-class GitCommit : public EventEmitter {
+class GitCommit : public ObjectWrap {
public:
/**
* v8::FunctionTemplate used to create Node.js constructor
@@ -59,7 +58,7 @@ class GitCommit : public EventEmitter {
static Handle<Value> New(const Arguments& args);
static Handle<Value> Lookup(const Arguments& args);
- static int EIO_Lookup(eio_req *req);
+ static void EIO_Lookup(eio_req *req);
static int EIO_AfterLookup(eio_req *req);
static Handle<Value> Close(const Arguments& args);
View
@@ -7,7 +7,6 @@
#define ERROR_H
#include <node.h>
-#include <node_events.h>
#include "../vendor/libgit2/include/git2.h"
View
@@ -7,7 +7,6 @@
#define INDEX_H
#include <node.h>
-#include <node_events.h>
#include "../vendor/libgit2/include/git2.h"
View
@@ -7,7 +7,6 @@ Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
#include <v8.h>
#include <node.h>
-#include <node_events.h>
#include "../vendor/libgit2/include/git2.h"
@@ -19,7 +18,7 @@ using namespace node;
/**
* Class wrapper for libgit2 git_object
*/
-class GitObject : public EventEmitter {
+class GitObject : public ObjectWrap {
public:
/**
* v8::FunctionTemplate used to create Node.js constructor
View
@@ -7,7 +7,6 @@
#define ODB_H
#include <node.h>
-#include <node_events.h>
#include "../vendor/libgit2/include/git2.h"
View
@@ -7,7 +7,6 @@
#define ODB_BACKEND_H
#include <node.h>
-#include <node_events.h>
#include "../vendor/libgit2/include/git2.h"
View
@@ -7,14 +7,13 @@ Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
#include <v8.h>
#include <node.h>
-#include <node_events.h>
#include "../vendor/libgit2/include/git2.h"
using namespace node;
using namespace v8;
-class GitOid : public EventEmitter {
+class GitOid : public ObjectWrap {
public:
static Persistent<FunctionTemplate> constructor_template;
static void Initialize (Handle<v8::Object> target);
View
@@ -7,7 +7,6 @@ Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
#include <v8.h>
#include <node.h>
-#include <node_events.h>
#include <string>
#include "../vendor/libgit2/include/git2.h"
@@ -18,7 +17,7 @@ Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
using namespace node;
using namespace v8;
-class GitReference : public EventEmitter {
+class GitReference : public ObjectWrap {
public:
static Persistent<FunctionTemplate> constructor_template;
static void Initialize(Handle<v8::Object> target);
@@ -33,7 +32,7 @@ class GitReference : public EventEmitter {
static Handle<Value> New(const Arguments& args);
static Handle<Value> Lookup(const Arguments& args);
- static int EIO_Lookup(eio_req* req);
+ static void EIO_Lookup(eio_req* req);
static int EIO_AfterLookup(eio_req* req);
static Handle<Value> Oid(const Arguments& args);
View
@@ -7,7 +7,6 @@ Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
#include <v8.h>
#include <node.h>
-#include <node_events.h>
#include <string>
#include "../vendor/libgit2/include/git2.h"
@@ -17,7 +16,7 @@ Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
using namespace node;
using namespace v8;
-class GitRepo : public EventEmitter {
+class GitRepo : public ObjectWrap {
public:
static Persistent<FunctionTemplate> constructor_template;
static void Initialize(Handle<v8::Object> target);
@@ -43,7 +42,7 @@ class GitRepo : public EventEmitter {
static Handle<Value> New(const Arguments& args);
static Handle<Value> Open(const Arguments& args);
- static int EIO_Open(eio_req* req);
+ static void EIO_Open(eio_req* req);
static int EIO_AfterOpen(eio_req* req);
static Handle<Value> Lookup(const Arguments& args);
@@ -53,7 +52,7 @@ class GitRepo : public EventEmitter {
static Handle<Value> Free(const Arguments& args);
static Handle<Value> Init(const Arguments& args);
- static int EIO_Init(eio_req* req);
+ static void EIO_Init(eio_req* req);
static int EIO_AfterInit(eio_req* req);
private:
View
@@ -7,7 +7,6 @@ Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
#include <v8.h>
#include <node.h>
-#include <node_events.h>
#include "../vendor/libgit2/include/git2.h"
@@ -17,7 +16,7 @@ Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
using namespace node;
using namespace v8;
-class GitRevWalk : public EventEmitter {
+class GitRevWalk : public ObjectWrap {
public:
static Persistent<FunctionTemplate> constructor_template;
static void Initialize(Handle<v8::Object> target);
@@ -42,7 +41,7 @@ class GitRevWalk : public EventEmitter {
static Handle<Value> Hide(const Arguments& args);
static Handle<Value> Next(const Arguments& args);
- static int EIO_Next(eio_req* req);
+ static void EIO_Next(eio_req* req);
static int EIO_AfterNext(eio_req* req);
static Handle<Value> Sorting(const Arguments& args);
View
@@ -7,7 +7,6 @@ Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
#include <v8.h>
#include <node.h>
-#include <node_events.h>
#include "../vendor/libgit2/include/git2.h"
@@ -16,7 +15,7 @@ Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
using namespace v8;
using namespace node;
-class GitSig : public EventEmitter {
+class GitSig : public ObjectWrap {
public:
static Persistent<FunctionTemplate> constructor_template;
static void Initialize(Handle<v8::Object> target);
View
@@ -7,7 +7,6 @@
#define TAG_H
#include <node.h>
-#include <node_events.h>
#include "../vendor/libgit2/include/git2.h"
View
@@ -7,7 +7,6 @@ Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
#include <v8.h>
#include <node.h>
-#include <node_events.h>
#include <string>
#include "../vendor/libgit2/include/git2.h"
@@ -21,7 +20,7 @@ using namespace node;
/**
* Class wrapper for libgit2 git_tree
*/
-class GitTree : public EventEmitter {
+class GitTree : public ObjectWrap {
public:
/**
* v8::FunctionTemplate used to create Node.js constructor
@@ -98,10 +97,10 @@ class GitTree : public EventEmitter {
static int EIO_AfterLookup(eio_req *req);
static Handle<Value> EntryCount(const Arguments& args);
static Handle<Value> EntryByIndex(const Arguments& args);
- static int EIO_EntryByIndex(eio_req *req);
+ static void EIO_EntryByIndex(eio_req *req);
static int EIO_AfterEntryByIndex(eio_req *req);
static Handle<Value> EntryByName(const Arguments& args);
- static int EIO_EntryByName(eio_req *req);
+ static void EIO_EntryByName(eio_req *req);
static int EIO_AfterEntryByName(eio_req *req);
static Handle<Value> SortEntries(const Arguments& args);
static Handle<Value> ClearEntries(const Arguments& args);
View
@@ -7,7 +7,6 @@ Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
#include <v8.h>
#include <node.h>
-#include <node_events.h>
#include "../vendor/libgit2/include/git2.h"
@@ -22,7 +21,7 @@ using namespace node;
/**
* Class wrapper for libgit2 git_tree_entry
*/
-class GitTreeEntry : EventEmitter {
+class GitTreeEntry : ObjectWrap {
public:
/**
* v8::FunctionTemplate used to create Node.js constructor
View
@@ -4,7 +4,6 @@ Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
#include <v8.h>
#include <node.h>
-#include <node_events.h>
#include "../vendor/libgit2/include/git2.h"
View
@@ -111,13 +111,12 @@ Handle<Value> GitBlob::Lookup(const Arguments& args) {
return scope.Close( Undefined() );
}
-int GitBlob::EIO_Lookup(eio_req* req) {
+void GitBlob::EIO_Lookup(eio_req* req) {
lookup_request* ar = static_cast<lookup_request* >(req->data);
git_oid oid = ar->oid->GetValue();
ar->err = ar->blob->Lookup(ar->repo->GetValue(), &oid);
- return 0;
}
int GitBlob::EIO_AfterLookup(eio_req* req) {
View
@@ -6,7 +6,6 @@
#include <string.h>
#include <v8.h>
#include <node.h>
-#include <node_events.h>
#include "../vendor/libgit2/include/git2.h"
@@ -147,13 +146,12 @@ Handle<Value> GitCommit::Lookup(const Arguments& args) {
return scope.Close( Undefined() );
}
-int GitCommit::EIO_Lookup(eio_req *req) {
+void GitCommit::EIO_Lookup(eio_req *req) {
lookup_request *ar = static_cast<lookup_request *>(req->data);
git_oid oid = ar->oid->GetValue();
ar->err = ar->commit->Lookup(ar->repo->GetValue(), &oid);
- return 0;
}
int GitCommit::EIO_AfterLookup(eio_req *req) {
View
@@ -5,7 +5,6 @@
#include <v8.h>
#include <node.h>
-#include <node_events.h>
#include "../vendor/libgit2/include/git2.h"
View
@@ -4,7 +4,6 @@ Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
#include <v8.h>
#include <node.h>
-#include <node_events.h>
#include "../vendor/libgit2/include/git2.h"
View
@@ -4,7 +4,6 @@ Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
#include <v8.h>
#include <node.h>
-#include <node_events.h>
#include "../vendor/libgit2/include/git2.h"
View
@@ -4,7 +4,6 @@ Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
#include <v8.h>
#include <node.h>
-#include <node_events.h>
#include <string>
#include "../vendor/libgit2/include/git2.h"
@@ -94,14 +93,13 @@ Handle<Value> GitReference::Lookup(const Arguments& args) {
return scope.Close( Undefined() );
}
-int GitReference::EIO_Lookup(eio_req *req) {
+void GitReference::EIO_Lookup(eio_req *req) {
lookup_request *ar = static_cast<lookup_request *>(req->data);
git_repository* repo = ar->repo->GetValue();
ar->err = ar->ref->Lookup(repo, ar->name.c_str());
- return 0;
}
int GitReference::EIO_AfterLookup(eio_req *req) {
View
@@ -4,7 +4,6 @@ Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
#include <v8.h>
#include <node.h>
-#include <node_events.h>
#include <string>
#include "../vendor/libgit2/include/git2.h"
@@ -101,12 +100,11 @@ Handle<Value> GitRepo::Open(const Arguments& args) {
return scope.Close( Undefined() );
}
-int GitRepo::EIO_Open(eio_req *req) {
+void GitRepo::EIO_Open(eio_req *req) {
open_request *ar = static_cast<open_request *>(req->data);
ar->err = ar->repo->Open(ar->path.c_str());
- return 0;
}
int GitRepo::EIO_AfterOpen(eio_req *req) {
@@ -258,12 +256,11 @@ Handle<Value> GitRepo::Init(const Arguments& args) {
return scope.Close( Undefined() );
}
-int GitRepo::EIO_Init(eio_req *req) {
+void GitRepo::EIO_Init(eio_req *req) {
init_request *ar = static_cast<init_request *>(req->data);
ar->err = ar->repo->Init(ar->path.c_str(), ar->is_bare);
- return 0;
}
int GitRepo::EIO_AfterInit(eio_req *req) {
Oops, something went wrong.

0 comments on commit a93d5f1

Please sign in to comment.