summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2016-03-31 11:35:53 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2016-03-31 11:55:47 +0200
commit98444536116279b4c4d150a0625b996de0883b80 (patch)
tree731c29d83f1492943ef3a224a81f99b8d8c470bc
parent2f0450f4d635358f6da5d174c128b9ed1059bbf8 (diff)
downloadlibgit2-98444536116279b4c4d150a0625b996de0883b80.tar.gz
Add a no-op size_t typedef for the doc parsercmn/typedef-sizet
Clang's documentation parser, which we use in our documentation system does not report any comments for functions which use size_t as a type. The root cause is buried somewhere in libclang but we can work around it by defining the type ourselves. This typedef makes sure that libclang sees it and that we do not change its size.
-rw-r--r--include/git2/common.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/git2/common.h b/include/git2/common.h
index 0629abb7f..d7428d811 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -29,6 +29,14 @@
# include <inttypes.h>
#endif
+#ifdef DOCURIUM
+/*
+ * This is so clang's doc parser acknowledges comments on functions
+ * with size_t parameters.
+ */
+typedef size_t size_t;
+#endif
+
/** Declare a public function exported for application use. */
#if __GNUC__ >= 4
# define GIT_EXTERN(type) extern \