summaryrefslogtreecommitdiff
path: root/src/errors.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/errors.h')
-rw-r--r--src/errors.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/errors.h b/src/errors.h
new file mode 100644
index 000000000..e323fc511
--- /dev/null
+++ b/src/errors.h
@@ -0,0 +1,17 @@
+#ifndef INCLUDE_errors_h__
+#define INCLUDE_errors_h__
+#include "git/errors.h"
+
+/* convenience functions */
+static inline int git_int_error(int code)
+{
+ git_errno = code;
+ return code;
+}
+
+static inline void *git_ptr_error(int code)
+{
+ git_errno = code;
+ return NULL;
+}
+#endif