[libgit2-glib] Added ggit_tag_get_target_type
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] Added ggit_tag_get_target_type
- Date: Tue, 24 Jun 2014 16:16:36 +0000 (UTC)
commit 8b4ec253f3c785210131610b7f2163a05d0b999b
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Tue Jun 24 18:15:34 2014 +0200
Added ggit_tag_get_target_type
libgit2-glib/ggit-tag.c | 16 ++++++++++++++++
libgit2-glib/ggit-tag.h | 2 ++
2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/libgit2-glib/ggit-tag.c b/libgit2-glib/ggit-tag.c
index 64cda7d..80b78bd 100644
--- a/libgit2-glib/ggit-tag.c
+++ b/libgit2-glib/ggit-tag.c
@@ -181,4 +181,20 @@ ggit_tag_get_message (GgitTag *tag)
return git_tag_message (t);
}
+/**
+ * ggit_tag_get_target_type:
+ * @tag: a #GgitTag.
+ *
+ * Get the target object type.
+ *
+ * Returns: a #GType.
+ **/
+GType
+ggit_tag_get_target_type (GgitTag *tag)
+{
+ g_return_val_if_fail (GGIT_IS_TAG (tag), G_TYPE_INVALID);
+
+ return ggit_utils_get_gtype_from_otype (git_tag_target_type (_ggit_native_get (tag)));
+}
+
/* ex:set ts=8 noet: */
diff --git a/libgit2-glib/ggit-tag.h b/libgit2-glib/ggit-tag.h
index 6694f1d..2dcaeb9 100644
--- a/libgit2-glib/ggit-tag.h
+++ b/libgit2-glib/ggit-tag.h
@@ -76,6 +76,8 @@ GgitSignature *ggit_tag_get_tagger (GgitTag *tag);
const gchar *ggit_tag_get_message (GgitTag *tag);
+GType ggit_tag_get_target_type (GgitTag *tag);
+
G_END_DECLS
#endif /* __GGIT_TAG_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]