Commit 0251733e by David Boyce

Changes to allow examples/*.c to compile and link. This required on

change to the signature of an API function (git_signature_new).
Also, the examples/general.c had a lot of unchecked return values
which were addresed with a couple of macros. The resulting example
still does not work correctly but at least now it fails with an
error message rather than not compiling or dumping core. Example
runtime issues may be addressed in a later commit.
parent 9940a01c
......@@ -48,7 +48,7 @@ GIT_BEGIN_DECL
* @param offset timezone offset in minutes for the time
* @return 0 on success; error code otherwise
*/
GIT_EXTERN(int) git_signature_new(git_signature **sig_out, const char *name, const char *email, git_time_t time, int offset);
GIT_EXTERN(int) git_signature_new(const git_signature **sig_out, const char *name, const char *email, git_time_t time, int offset);
/**
* Create a new action signature with a timestamp of 'now'. The
......
......@@ -81,7 +81,7 @@ static int process_trimming(const char *input, char **storage, const char *input
return GIT_SUCCESS;
}
int git_signature_new(git_signature **sig_out, const char *name, const char *email, git_time_t time, int offset)
int git_signature_new(const git_signature **sig_out, const char *name, const char *email, git_time_t time, int offset)
{
int error;
git_signature *p = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment