[libgit2-glib] Use Hunk and Line in callbacks
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] Use Hunk and Line in callbacks
- Date: Fri, 22 Nov 2013 07:28:25 +0000 (UTC)
commit c362dbd8808b8330dca7b12a4b19f407cb13a2ee
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Nov 21 17:41:03 2013 +0100
Use Hunk and Line in callbacks
libgit2-glib/ggit-types.h | 39 +++++++++++++++++++--------------------
1 files changed, 19 insertions(+), 20 deletions(-)
---
diff --git a/libgit2-glib/ggit-types.h b/libgit2-glib/ggit-types.h
index 4768558..3b0b2b5 100644
--- a/libgit2-glib/ggit-types.h
+++ b/libgit2-glib/ggit-types.h
@@ -117,18 +117,25 @@ typedef struct _GgitDiffDelta GgitDiffDelta;
typedef struct _GgitDiffFile GgitDiffFile;
/**
- * GgitDiffOptions:
+ * GgitDiffHunk:
*
- * Represents the options used when creating a #GgitDiff.
+ * Represents the hunk of a diff.
*/
-typedef struct _GgitDiffOptions GgitDiffOptions;
+typedef struct _GgitDiffHunk GgitDiffHunk;
/**
- * GgitDiffRange:
+ * GgitDiffLine:
*
- * Represents the hunk of a diff.
+ * Represents the line of a diff.
+ */
+typedef struct _GgitDiffLine GgitDiffLine;
+
+/**
+ * GgitDiffOptions:
+ *
+ * Represents the options used when creating a #GgitDiff.
*/
-typedef struct _GgitDiffRange GgitDiffRange;
+typedef struct _GgitDiffOptions GgitDiffOptions;
/**
* GgitDiffSimilarityMetric:
@@ -895,9 +902,7 @@ typedef gint (* GgitDiffFileCallback) (GgitDiffDelta *delta,
/**
* GgitDiffHunkCallback:
* @delta: a #GgitDiffDelta.
- * @range: a #GgitDiffRange.
- * @header: (array length=header_len) (element-type guint8): the header.
- * @header_len: the header length.
+ * @hunk: a #GgitDiffHunk.
* @user_data: (closure): user-supplied data.
*
* Called for each hunk.
@@ -905,18 +910,14 @@ typedef gint (* GgitDiffFileCallback) (GgitDiffDelta *delta,
* Returns: 0 to go continue or a #GgitError in case there was an error.
*/
typedef gint (* GgitDiffHunkCallback) (GgitDiffDelta *delta,
- GgitDiffRange *range,
- const gchar *header,
- gsize header_len,
+ GgitDiffHunk *hunk,
gpointer user_data);
/**
* GgitDiffLineCallback:
* @delta: a #GgitDiffDelta.
- * @range: a #GgitDiffRange.
- * @line_type: a #GgitDiffLineType.
- * @content: (array length=content_len) (element-type guint8): the content.
- * @content_len: the content length.
+ * @hunk: a #GgitDiffHunk.
+ * @line: a #GgitDiffLine.
* @user_data: (closure): user-supplied data.
*
* Called for each line.
@@ -924,10 +925,8 @@ typedef gint (* GgitDiffHunkCallback) (GgitDiffDelta *delta,
* Returns: 0 to go continue or a #GgitError in case there was an error.
*/
typedef gint (* GgitDiffLineCallback) (GgitDiffDelta *delta,
- GgitDiffRange *range,
- GgitDiffLineType line_type,
- const gchar *content,
- gsize content_len,
+ GgitDiffHunk *hunk,
+ GgitDiffLine *line,
gpointer user_data);
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]