summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common.h b/src/common.h
index 9bb1116b5..640f94806 100644
--- a/src/common.h
+++ b/src/common.h
@@ -124,9 +124,9 @@
#define GIT_ERROR_CHECK_ALLOC(ptr) if (ptr == NULL) { return -1; }
/**
- * Check a buffer allocation result, returning -1 if it failed.
+ * Check a string buffer allocation result, returning -1 if it failed.
*/
-#define GIT_ERROR_CHECK_ALLOC_BUF(buf) if ((void *)(buf) == NULL || git_buf_oom(buf)) { return -1; }
+#define GIT_ERROR_CHECK_ALLOC_STR(buf) if ((void *)(buf) == NULL || git_str_oom(buf)) { return -1; }
/**
* Check a return value and propagate result if non-zero.
@@ -202,6 +202,9 @@ GIT_INLINE(void) git__init_structure(void *structure, size_t len, unsigned int v
/* NOTE: other git_error functions are in the public errors.h header file */
+/* Forward declare git_str */
+typedef struct git_str git_str;
+
#include "util.h"
#endif