From bde336ea51df071de922827ae322df7b01b059ce Mon Sep 17 00:00:00 2001 From: Ben Straub Date: Thu, 29 Nov 2012 12:26:09 -0800 Subject: Add version fields and init macros for public input structs. --- include/git2/remote.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/git2/remote.h') diff --git a/include/git2/remote.h b/include/git2/remote.h index 6c70d7fbc..e5b60b951 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -338,12 +338,16 @@ typedef enum git_remote_completion_type { * Set the calbacks to be called by the remote. */ struct git_remote_callbacks { + unsigned int version; void (*progress)(const char *str, int len, void *data); int (*completion)(git_remote_completion_type type, void *data); int (*update_tips)(const char *refname, const git_oid *a, const git_oid *b, void *data); void *payload; }; +#define GIT_REMOTE_CALLBACKS_VERSION 1 +#define GIT_REMOTE_CALLBACKS_INIT {GIT_REMOTE_CALLBACKS_VERSION, 0} + /** * Set the callbacks for a remote * -- cgit v1.2.1 From 9267ff586f29deb99f41ab6eeb0599917ddd0cec Mon Sep 17 00:00:00 2001 From: Ben Straub Date: Thu, 29 Nov 2012 20:01:24 -0800 Subject: Deploy GIT_REMOTE_CALLBACKS_INIT --- include/git2/remote.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/git2/remote.h') diff --git a/include/git2/remote.h b/include/git2/remote.h index e5b60b951..3e22004a1 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -356,8 +356,9 @@ struct git_remote_callbacks { * * @param remote the remote to configure * @param callbacks a pointer to the user's callback settings + * @return 0 or an error code */ -GIT_EXTERN(void) git_remote_set_callbacks(git_remote *remote, git_remote_callbacks *callbacks); +GIT_EXTERN(int) git_remote_set_callbacks(git_remote *remote, git_remote_callbacks *callbacks); /** * Get the statistics structure that is filled in by the fetch operation. -- cgit v1.2.1