move declaration of object labels to got_lib_object.h
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
diff --git a/lib/got_lib_object.h b/lib/got_lib_object.h
index fa6616e..ef0808b 100644
--- a/lib/got_lib_object.h
+++ b/lib/got_lib_object.h
@@ -75,6 +75,21 @@ struct got_tag_object {
int refcnt; /* > 0 if open and/or cached */
};
+#define GOT_OBJ_LABEL_COMMIT "commit"
+#define GOT_OBJ_LABEL_TREE "tree"
+#define GOT_OBJ_LABEL_BLOB "blob"
+#define GOT_OBJ_LABEL_TAG "tag"
+
+#define GOT_COMMIT_LABEL_TREE "tree "
+#define GOT_COMMIT_LABEL_PARENT "parent "
+#define GOT_COMMIT_LABEL_AUTHOR "author "
+#define GOT_COMMIT_LABEL_COMMITTER "committer "
+
+#define GOT_TAG_LABEL_OBJECT "object "
+#define GOT_TAG_LABEL_TYPE "type "
+#define GOT_TAG_LABEL_TAG "tag "
+#define GOT_TAG_LABEL_TAGGER "tagger "
+
struct got_object_id *got_object_get_id(struct got_object *);
const struct got_error *got_object_get_id_str(char **, struct got_object *);
const struct got_error *got_object_open(struct got_object **,
diff --git a/lib/object_parse.c b/lib/object_parse.c
index 2862561..0852ad5 100644
--- a/lib/object_parse.c
+++ b/lib/object_parse.c
@@ -54,21 +54,6 @@
#define nitems(_a) (sizeof(_a) / sizeof((_a)[0]))
#endif
-#define GOT_OBJ_LABEL_COMMIT "commit"
-#define GOT_OBJ_LABEL_TREE "tree"
-#define GOT_OBJ_LABEL_BLOB "blob"
-#define GOT_OBJ_LABEL_TAG "tag"
-
-#define GOT_COMMIT_LABEL_TREE "tree "
-#define GOT_COMMIT_LABEL_PARENT "parent "
-#define GOT_COMMIT_LABEL_AUTHOR "author "
-#define GOT_COMMIT_LABEL_COMMITTER "committer "
-
-#define GOT_TAG_LABEL_OBJECT "object "
-#define GOT_TAG_LABEL_TYPE "type "
-#define GOT_TAG_LABEL_TAG "tag "
-#define GOT_TAG_LABEL_TAGGER "tagger "
-
int
got_object_id_cmp(const struct got_object_id *id1,
const struct got_object_id *id2)