diff options
author | Vicent Martà <tanoku@gmail.com> | 2012-03-07 00:02:55 +0100 |
---|---|---|
committer | Vicent Martà <tanoku@gmail.com> | 2012-03-07 00:11:43 +0100 |
commit | cb8a79617b15e347f26d21cedde0f2b8670c1876 (patch) | |
tree | 459706192f41bbf15496f0c9bfe2e21b16a7e70b /src/buffer.h | |
parent | 9d160ba85539bbc593369f597a07d42c2770dff4 (diff) | |
download | libgit2-cb8a79617b15e347f26d21cedde0f2b8670c1876.tar.gz |
error-handling: Repository
This also includes droping `git_buf_lasterror` because it makes no sense
in the new system. Note that in most of the places were it has been
dropped, the code needs cleanup. I.e. GIT_ENOMEM is going away, so
instead it should return a generic `-1` and obviously not throw
anything.
Diffstat (limited to 'src/buffer.h')
-rw-r--r-- | src/buffer.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/buffer.h b/src/buffer.h index 3cdd794af..6f59dce62 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -57,15 +57,10 @@ void git_buf_attach(git_buf *buf, char *ptr, size_t asize); * further calls to modify the buffer will fail. Check git_buf_oom() at the * end of your sequence and it will be true if you ran out of memory at any * point with that buffer. - * @return 0 if no error, 1 if allocation error. - */ -int git_buf_oom(const git_buf *buf); - -/** - * Just like git_buf_oom, except returns appropriate error code. - * @return GIT_ENOMEM if allocation error, GIT_SUCCESS if not. + * + * @return false if no error, true if allocation error */ -int git_buf_lasterror(const git_buf *buf); +bool git_buf_oom(const git_buf *buf); /* * The functions below that return int values, will return GIT_ENOMEM |