diff options
author | Vicent Martà <tanoku@gmail.com> | 2011-08-03 18:54:25 -0700 |
---|---|---|
committer | Vicent Martà <tanoku@gmail.com> | 2011-08-03 18:54:25 -0700 |
commit | 42c5b64aa25aa6072baccba1f1845ae7afdc47ed (patch) | |
tree | 718bf96b9d66d3bfd42fbfd749c85ae72dc9234b /include/git2 | |
parent | 03d88ed415a09faf161d8a081c18f51826be584a (diff) | |
parent | 63396a3998610ea1e3555b15a26051525e00e58e (diff) | |
download | libgit2-42c5b64aa25aa6072baccba1f1845ae7afdc47ed.tar.gz |
Merge pull request #348 from schu/sig-new
signature.c: fix off-by-one error
Diffstat (limited to 'include/git2')
-rw-r--r-- | include/git2/signature.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/git2/signature.h b/include/git2/signature.h index 4b5601783..f5d03ac77 100644 --- a/include/git2/signature.h +++ b/include/git2/signature.h @@ -41,23 +41,25 @@ GIT_BEGIN_DECL * Create a new action signature. The signature must be freed * manually or using git_signature_free * + * @param sig_out new signature, in case of error NULL * @param name name of the person * @param email email of the person * @param time time when the action happened * @param offset timezone offset in minutes for the time - * @return the new sig, NULL on out of memory + * @return 0 on success; error code otherwise */ -GIT_EXTERN(git_signature *) git_signature_new(const char *name, const char *email, git_time_t time, int offset); +GIT_EXTERN(int) git_signature_new(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 * signature must be freed manually or using git_signature_free * + * @param sig_out new signature, in case of error NULL * @param name name of the person * @param email email of the person - * @return the new sig, NULL on out of memory + * @return 0 on success; error code otherwise */ -GIT_EXTERN(git_signature *) git_signature_now(const char *name, const char *email); +GIT_EXTERN(int) git_signature_now(git_signature **sig_out, const char *name, const char *email); /** |