FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodegit/src/threads.cc at v0.1.1 · nodegit/nodegit · GitHub
nodegit
nodegit
Repository navigation
Code
Issues
344
(344)
Pull requests
21
(21)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
nodegit
/
src
/
threads.cc
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
61 lines (42 loc) · 1.15 KB
Breadcrumbs
nodegit
/
src
/
threads.cc
Copy path
File metadata and controls
executable file
·
61 lines (42 loc) · 1.15 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
*
* This code is auto-generated; unless you know what you're doing, do not modify!
*
*/
#
include
<
v8.h
>
#
include
<
node.h
>
#
include
<
string.h
>
#
include
"
git2.h
"
#
include
"
../include/functions/copy.h
"
#
include
"
../include/threads.h
"
using
namespace
v8
;
using
namespace
node
;
void
GitThreads::Initialize
(Handle<v8::Object> target) {
NanScope
();
Persistent<Object> object;
NanAssignPersistent
(Object, object,
Object::New
());
NanPersistentToLocal
(object)->
Set
(
String::NewSymbol
(
"
init
"
),
FunctionTemplate::New
(Init)->
GetFunction
());
NanPersistentToLocal
(object)->
Set
(
String::NewSymbol
(
"
shutdown
"
),
FunctionTemplate::New
(Shutdown)->
GetFunction
());
target->
Set
(
String::NewSymbol
(
"
Threads
"
),
NanPersistentToLocal
(object));
}
/*
*
*/
NAN_METHOD
(GitThreads::Init) {
NanScope
();
int
result =
git_threads_init
(
);
if
(result !=
GIT_OK
) {
if
(
giterr_last
()) {
return
NanThrowError
(
String::New
(
giterr_last
()->
message
));
}
else
{
return
NanThrowError
(
String::New
(
"
Unkown Error
"
));
}
}
NanReturnUndefined
();
}
/*
*
*/
NAN_METHOD
(GitThreads::Shutdown) {
NanScope
();
git_threads_shutdown
(
);
NanReturnUndefined
();
}
Back
|
FazBrowse Home
|
New Git URL