ctucx.git: nimgit

[nimlang] nim-wrapper for libgit2

commit 022d1bcf6cfcb5ddbed09f8e197e3b0367d8b192
parent 910bc779ad1f2fe7fcfbdc6d3b5c871e6084140d
Author: Leah (ctucx) <leah@ctu.cx>
Date: Wed, 17 Mar 2021 18:22:19 +0100

types.nim: new types: GitBuffer, GitErrorObj; remove GitTime.isSigned
1 file changed, 8 insertions(+), 3 deletions(-)
M
nimgit/types.nim
|
11
++++++++---
diff --git 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