summaryrefslogtreecommitdiff
path: root/include/git2/diff.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2014-04-30 10:57:42 -0700
committerRussell Belfer <rb@github.com>2014-05-02 09:21:33 -0700
commit702efc891f2a620f10998062ba0c00b34100f632 (patch)
treee80132037df687837a40b5c3d8f1d6a079d35e43 /include/git2/diff.h
parent9c8ed4999740e921ecc2966bbcd0dbcfc725f59a (diff)
downloadlibgit2-702efc891f2a620f10998062ba0c00b34100f632.tar.gz
Make init_options fns use unsigned ints and macro
Use an unsigned int for the version and add a helper macro so the code is simplified (and so the error message is a common string).
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r--include/git2/diff.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index b849e3bb5..b40cc6135 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -388,13 +388,13 @@ typedef struct {
{GIT_DIFF_OPTIONS_VERSION, 0, GIT_SUBMODULE_IGNORE_DEFAULT, {NULL,0}, NULL, NULL, 3}
/**
-* Initializes a `git_diff_options` with default values. Equivalent to
-* creating an instance with GIT_DIFF_OPTIONS_INIT.
-*
-* @param opts The `git_diff_options` instance to initialize.
-* @param version Version of struct; pass `GIT_DIFF_OPTIONS_VERSION`
-* @return Zero on success; -1 on failure.
-*/
+ * Initializes a `git_diff_options` with default values. Equivalent to
+ * creating an instance with GIT_DIFF_OPTIONS_INIT.
+ *
+ * @param opts The `git_diff_options` struct to initialize
+ * @param version Version of struct; pass `GIT_DIFF_OPTIONS_VERSION`
+ * @return Zero on success; -1 on failure.
+ */
GIT_EXTERN(int) git_diff_init_options(
git_diff_options *opts,
unsigned int version);
@@ -628,13 +628,13 @@ typedef struct {
#define GIT_DIFF_FIND_OPTIONS_INIT {GIT_DIFF_FIND_OPTIONS_VERSION}
/**
-* Initializes a `git_diff_find_options` with default values. Equivalent to
-* creating an instance with GIT_DIFF_FIND_OPTIONS_INIT.
-*
-* @param opts The `git_diff_find_options` instance to initialize.
-* @param version Version of struct; pass `GIT_DIFF_FIND_OPTIONS_VERSION`
-* @return Zero on success; -1 on failure.
-*/
+ * Initializes a `git_diff_find_options` with default values. Equivalent to
+ * creating an instance with GIT_DIFF_FIND_OPTIONS_INIT.
+ *
+ * @param opts The `git_diff_find_options` struct to initialize
+ * @param version Version of struct; pass `GIT_DIFF_FIND_OPTIONS_VERSION`
+ * @return Zero on success; -1 on failure.
+ */
GIT_EXTERN(int) git_diff_find_init_options(
git_diff_find_options *opts,
unsigned int version);
@@ -1221,14 +1221,14 @@ GIT_EXTERN(int) git_diff_commit_as_email(
const git_diff_options *diff_opts);
/**
-* Initializes a `git_diff_format_email_options` with default values.
-*
-* Equivalent to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.
-*
-* @param opts Uhe `git_diff_format_email_options` instance to initialize.
-* @param version Version of struct; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`
-* @return Zero on success; -1 on failure.
-*/
+ * Initializes a `git_diff_format_email_options` with default values.
+ *
+ * Equivalent to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.
+ *
+ * @param opts The `git_diff_format_email_options` struct to initialize
+ * @param version Version of struct; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`
+ * @return Zero on success; -1 on failure.
+ */
GIT_EXTERN(int) git_diff_format_email_init_options(
git_diff_format_email_options *opts,
unsigned int version);