summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeah (ctucx) <leah@ctu.cx>2021-03-17 18:22:19 +0100
committerLeah (ctucx) <leah@ctu.cx>2021-03-17 18:22:19 +0100
commit022d1bcf6cfcb5ddbed09f8e197e3b0367d8b192 (patch)
tree08411774140f9ee8fc0de098c234eb53feace4cb
parent910bc779ad1f2fe7fcfbdc6d3b5c871e6084140d (diff)
downloadnimgit-022d1bcf6cfcb5ddbed09f8e197e3b0367d8b192.tar.gz
nimgit-022d1bcf6cfcb5ddbed09f8e197e3b0367d8b192.tar.bz2
nimgit-022d1bcf6cfcb5ddbed09f8e197e3b0367d8b192.zip
types.nim: new types: GitBuffer, GitErrorObj; remove GitTime.isSigned
-rw-r--r--nimgit/types.nim9
1 files changed, 7 insertions, 2 deletions
diff --git a/nimgit/types.nim b/nimgit/types.nim
index 0ddfd75..4c2e532 100644
--- a/nimgit/types.nim
+++ b/nimgit/types.nim
@@ -10,6 +10,7 @@ type
GitReference* = ptr git_reference
GitRevisionWalker* = ptr git_revwalk
GitBranchIterator* = ptr git_branch_iterator
+ GitBuffer* = ptr git_buf
GitObjectKind* = enum
# we have to add 2 here to satisfy nim; discriminants.low must be zero
@@ -27,7 +28,6 @@ type
GitTime* = object
time* : Time
offset* : int
- isSigned* : bool
GitSignature* = object
name* : string
@@ -111,4 +111,9 @@ type
gecWorkTree = (GIT_ERROR_WORKTREE, "work tree")
gecSHA1 = (GIT_ERROR_SHA1, "sha1")
-template getResultCode* (code: cint): GitReturnCode = cast[GitReturnCode](code.ord) \ No newline at end of file
+ GitErrorObj* = object
+ message* : string
+ class* : GitErrorClass
+
+template getResultCode* (code: cint): GitReturnCode = cast[GitReturnCode](code.ord)
+template getErrorClass* (code: cint): GitErrorClass = cast[GitErrorClass](code.ord) \ No newline at end of file