/**
* This code is auto-generated; unless you know what you're doing, do not modify!
**/
#include
#include
#include
#include "git2.h"
#include "../include/functions/copy.h"
#include "../include/threads.h"
using namespace v8;
using namespace node;
void GitThreads::Initialize(Handle target) {
HandleScope scope;
Persistent object = Persistent::New(Object::New());
object->Set(String::NewSymbol("init"), FunctionTemplate::New(Init)->GetFunction());
object->Set(String::NewSymbol("shutdown"), FunctionTemplate::New(Shutdown)->GetFunction());
target->Set(String::NewSymbol("Threads"), object);
}
/**
*/
Handle GitThreads::Init(const Arguments& args) {
HandleScope scope;
int result = git_threads_init(
);
if (result != GIT_OK) {
if (giterr_last()) {
return ThrowException(Exception::Error(String::New(giterr_last()->message)));
} else {
return ThrowException(Exception::Error(String::New("Unkown Error")));
}
}
return Undefined();
}
/**
*/
Handle GitThreads::Shutdown(const Arguments& args) {
HandleScope scope;
git_threads_shutdown(
);
return Undefined();
}