diff options
Diffstat (limited to 'include/git2')
-rw-r--r-- | include/git2/errors.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/git2/errors.h b/include/git2/errors.h index e3f5f4cb0..9b28093dc 100644 --- a/include/git2/errors.h +++ b/include/git2/errors.h @@ -122,16 +122,17 @@ typedef struct { typedef enum { GITERR_NOMEMORY, + GITERR_OS, GITERR_REFERENCE, + GITERR_ZLIB, } git_error_class; -#define GITERR_CHECK_ALLOC(ptr, error) if (ptr == NULL) { giterr_set_oom(error); return -1 } +#define GITERR_CHECK_ALLOC(ptr) if (ptr == NULL) { return -1; } -GIT_EXTERN(void) giterr_set(git_error **error_out, int error_class, const char *string, ...); -GIT_EXTERN(void) giterr_set_oom(git_error **error); -GIT_EXTERN(void) giterr_free(git_error *error); -GIT_EXTERN(void) giterr_clear(git_error **error); +GIT_EXTERN(void) giterr_set_oom(void); +GIT_EXTERN(void) giterr_set(int error_class, const char *string, ...); +GIT_EXTERN(void) giterr_clear(void); /** * Return a detailed error string with the latest error |