summaryrefslogtreecommitdiff
path: root/include/git2/diff.h
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2014-09-18 11:53:24 +0200
committerCiro Santilli <ciro.santilli@gmail.com>2014-09-24 11:00:51 +0200
commit062804570c3e25170b52f849da173f8266b5e33e (patch)
tree549b2179523a84912e45cbf9490733474dc49b5c /include/git2/diff.h
parent3a495c19bd280f5455047a9ac0e936f2c2f2f9a9 (diff)
downloadlibgit2-062804570c3e25170b52f849da173f8266b5e33e.tar.gz
Join typedef and struct definitions in single file.
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r--include/git2/diff.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index 8147fd31c..ca49a9cd9 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -421,15 +421,14 @@ typedef int (*git_diff_file_cb)(
/**
* Structure describing a hunk of a diff.
*/
-typedef struct git_diff_hunk git_diff_hunk;
-struct git_diff_hunk {
+typedef struct git_diff_hunk {
int old_start; /**< Starting line number in old_file */
int old_lines; /**< Number of lines in old_file */
int new_start; /**< Starting line number in new_file */
int new_lines; /**< Number of lines in new_file */
size_t header_len; /**< Number of bytes in header text */
char header[128]; /**< Header text, NUL-byte terminated */
-};
+} git_diff_hunk;
/**
* When iterating over a diff, callback that will be made per hunk.
@@ -469,8 +468,7 @@ typedef enum {
/**
* Structure describing a line (or data span) of a diff.
*/
-typedef struct git_diff_line git_diff_line;
-struct git_diff_line {
+typedef struct git_diff_line {
char origin; /**< A git_diff_line_t value */
int old_lineno; /**< Line number in old file or -1 for added line */
int new_lineno; /**< Line number in new file or -1 for deleted line */
@@ -478,7 +476,7 @@ struct git_diff_line {
size_t content_len; /**< Number of bytes of data */
git_off_t content_offset; /**< Offset in the original file to the content */
const char *content; /**< Pointer to diff text, not NUL-byte terminated */
-};
+} git_diff_line;
/**
* When iterating over a diff, callback that will be made per text diff