Skip to content

Commit

Permalink
Fix compile errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Feb 4, 2014
1 parent 38fe88c commit 59930a2
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 14 deletions.
3 changes: 3 additions & 0 deletions src/git/c/blame.d
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module git.c.blame;

import git.c.common;
import git.c.oid;
import git.c.types;

extern(C):

Expand Down Expand Up @@ -76,6 +77,8 @@ struct git_blame_options {
uint32_t max_line;
}

enum GIT_BLAME_OPTIONS_VERSION = 1;
enum git_blame_options GIT_BLAME_OPTIONS_INIT = {GIT_BLAME_OPTIONS_VERSION};

/**
* Structure that represents a blame hunk.
Expand Down
1 change: 1 addition & 0 deletions src/git/c/config.d
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module git.c.config;
import git.c.common;
import git.c.types;
import git.c.util;
import git.c.sys.config;

extern (C):

Expand Down
9 changes: 5 additions & 4 deletions src/git/c/diff.d
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module git.c.diff;
import git.c.common;
import git.c.types;
import git.c.oid;
import git.c.strarray;
import git.c.tree;
import git.c.refs;

Expand Down Expand Up @@ -377,8 +378,8 @@ enum GIT_DIFF_OPTIONS_VERSION = 1;
/* Stack initializer for diff options. Alternatively use
* `git_diff_options_init` programmatic initialization.
*/
enum git_diff_options = GIT_DIFF_OPTIONS_INIT =
{GIT_DIFF_OPTIONS_VERSION, 0, GIT_SUBMODULE_IGNORE_DEFAULT, {NULL,0}, NULL, NULL, 3}
enum git_diff_options GIT_DIFF_OPTIONS_INIT =
{GIT_DIFF_OPTIONS_VERSION, 0, git_submodule_ignore_t.GIT_SUBMODULE_IGNORE_DEFAULT, {null,0}, null, null, 3};

/**
* When iterating over a diff, callback that will be made per file.
Expand Down Expand Up @@ -512,10 +513,10 @@ enum git_diff_find_t {
*/
struct git_diff_similarity_metric {
int function(
void **out, const(git_diff_file)* file,
void **out_, const(git_diff_file)* file,
const(char)* fullpath, void *payload) file_signature;
int function(
void **out, const(git_diff_file)* file,
void **out_, const(git_diff_file)* file,
const(char)* buf, size_t buflen, void *payload) buffer_signature;
void function(void *sig, void *payload) free_signature;
int function(int *score, void *siga, void *sigb, void *payload) similarity;
Expand Down
2 changes: 1 addition & 1 deletion src/git/c/index.d
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ mixin _ExportEnumMembers!git_index_add_option_t;
* Some index APIs take a stage to match; pass this value to match
* any entry matching the path regardless of stage.
*/
#define GIT_INDEX_STAGE_ANY -1
enum GIT_INDEX_STAGE_ANY = -1;

/** @name Index File Functions
*
Expand Down
2 changes: 1 addition & 1 deletion src/git/c/merge.d
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ struct git_merge_opts {
}

enum GIT_MERGE_OPTS_VERSION = 1;
enum git_merge_opts GIT_MERGE_OPTS_INIT = {GIT_MERGE_OPTS_VERSION, 0, GIT_MERGE_TREE_OPTS_INIT, GIT_CHECKOUT_OPTS_INIT};
enum git_merge_opts GIT_MERGE_OPTS_INIT = {GIT_MERGE_OPTS_VERSION, cast(git_merge_flags_t)0, GIT_MERGE_TREE_OPTS_INIT, GIT_CHECKOUT_OPTS_INIT};


/**
Expand Down
8 changes: 4 additions & 4 deletions src/git/c/remote.d
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ mixin _ExportEnumMembers!git_remote_completion_type;
* about the progress of the network operations.
*/
struct git_remote_callbacks {
uint version;
uint version_ = GIT_REMOTE_CALLBACKS_VERSION;
/**
* Textual progress from the remote. Text send over the
* progress side-band will be passed to this function (this is
Expand All @@ -450,14 +450,14 @@ struct git_remote_callbacks {
* This will be called if the remote host requires
* authentication in order to connect to it.
*/
int function(git_cred **cred, const(char)* url, const(char)* username_from_url, unsigned int allowed_types, void *data) credentials;
int function(git_cred **cred, const(char)* url, const(char)* username_from_url, uint allowed_types, void *data) credentials;

/**
* During the download of new data, this will be regularly
* called with the current count of progress done by the
* indexer.
*/
int function(const git_transfer_progress *stats, void *data) transfer_progress;
int function(const(git_transfer_progress)* stats, void *data) transfer_progress;

/**
* Each time a reference is updated locally, this function
Expand Down Expand Up @@ -503,7 +503,7 @@ mixin _ExportEnumMembers!git_remote_autotag_option_t;
/**
* Retrieve the tag auto-follow setting
*
* @param remote the remote to query
* @param remote the re-mote to query
* @return the auto-follow setting
*/
git_remote_autotag_option_t git_remote_autotag(git_remote *remote);
Expand Down
4 changes: 2 additions & 2 deletions src/git/c/sys/config.d
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ struct git_config_backend {
int function(git_config_backend *, const(char)* key, const(char)* value) set;
int function(git_config_backend *cfg, const(char)* name, const(char)* regexp, const(char)* value) set_multivar;
int function(git_config_backend *, const(char)* key) del;
int function(struct git_config_backend *, const char *key, const char *regexp) del_multivar;
int function(git_config_iterator **, struct git_config_backend *) iterator;
int function(git_config_backend *, const(char)* key, const(char)* regexp) del_multivar;
int function(git_config_iterator **, git_config_backend *) iterator;
int function(git_config_backend *) refresh;
void function(git_config_backend *) free;
}
Expand Down
3 changes: 3 additions & 0 deletions src/git/c/sys/filter.d
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ module git.c.sys.filter;
*/

import git.c.filter;
import git.c.buffer;
import git.c.oid;
import git.c.types;

/**
* @file git2/sys/filter.h
Expand Down
4 changes: 2 additions & 2 deletions src/git/c/transport.d
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,10 @@ struct git_transport
/* This function may be called after a successful call to
* connect(). The array returned is owned by the transport and
* is guranteed until the next call of a transport function. */
int (*ls)(
int function(
const(git_remote_head)*** out_,
size_t *size,
git_transport *transport);
git_transport *transport) ls;

/* Executes the push whose context is in the git_push object. */
int function(git_transport *transport, git_push *push) push;
Expand Down

0 comments on commit 59930a2

Please sign in to comment.