Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-09-22 02:04:39 +0400
committerRussell Belfer <rb@github.com>2012-09-22 02:04:39 +0400
commit1a628100534a315bd00361fc3d32df671923c107 (patch)
treec378b11f15a0323ff2c634bc63ec305255d45124 /src/common.h
parent0cb24616eea3b92893b2a03e851a0db2c04862ef (diff)
Make giterr_set_str public
There has been discussion for a while about making some set of the `giterr_set` type functions part of the public API for code that is implementing new backends to libgit2. This makes the `giterr_set_str()` and `giterr_set_oom()` functions public.
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/common.h b/src/common.h
index 1d85428b3..747bbf7ce 100644
--- a/src/common.h
+++ b/src/common.h
@@ -49,14 +49,24 @@
#include <regex.h>
+/**
+ * Check a pointer allocation result, returning -1 if it failed.
+ */
#define GITERR_CHECK_ALLOC(ptr) if (ptr == NULL) { return -1; }
-void giterr_set_oom(void);
+/**
+ * Set the error message for this thread, formatting as needed.
+ */
void giterr_set(int error_class, const char *string, ...);
-void giterr_clear(void);
-void giterr_set_str(int error_class, const char *string);
+
+/**
+ * Set the error message for a regex failure, using the internal regex
+ * error code lookup.
+ */
void giterr_set_regex(const regex_t *regex, int error_code);
+/* NOTE: other giterr functions are in the public errors.h header file */
+
#include "util.h"
typedef struct git_transport git_transport;