Commit e02fc99fa16589e5287b101098e25f62e598a285

Stefan Sperling 2019-03-19T12:40:44

move declaration of object labels to got_lib_object.h

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)