[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/nodegit/nodegit/v0.1.4/src/threads.cc [Back]  [Original]

/**
 * This code is auto-generated; unless you know what you're doing, do not modify!
 **/
#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) {
  NanScope();

  Local object = NanNew();

  NODE_SET_METHOD(object, "init", Init);
  NODE_SET_METHOD(object, "shutdown", Shutdown);

  target->Set(NanNew("Threads"), object);
}


/**
 */
NAN_METHOD(GitThreads::Init) {
  NanScope();
  

  int result = git_threads_init(
  );
  if (result != GIT_OK) {
    if (giterr_last()) {
      return NanThrowError(giterr_last()->message);
    } else {
      return NanThrowError("Unknown Error");
    }
  }

  NanReturnUndefined();
}

/**
 */
NAN_METHOD(GitThreads::Shutdown) {
  NanScope();
  

  git_threads_shutdown(
  );

  NanReturnUndefined();
}


Web Proxy Viewer  |  New URL  |  Original Page