diff options
author | Vicent Marti <tanoku@gmail.com> | 2010-10-28 02:07:18 +0300 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2010-10-28 02:07:18 +0300 |
commit | 585190183b47dc991605abcfbe3afb57220a0f29 (patch) | |
tree | f8a1f2572f667296a5b5121c64c74bb353557c93 /src/git/commit.h | |
parent | 2d16373cb8d8c22b3ec99a6936b82821e99e64a5 (diff) | |
download | libgit2-585190183b47dc991605abcfbe3afb57220a0f29.tar.gz |
Fix internal memory management on the library
String mememory is now managed in a much more sane manner.
Fixes include:
- git_person email and name is no longer limited to 64 characters
- git_tree_entry filename is no longer limited to 255 characters
- raw objects are properly opened & closed the minimum amount of
times required for parsing
- unit tests no longer leak
- removed 5 other misc memory leaks as reported by Valgrind
- tree writeback no longer segfaults on rare ocassions
The git_person struct is no longer public. It is now managed by the
library, and getter methods are in place to access its internal
attributes.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/git/commit.h')
-rw-r--r-- | src/git/commit.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/git/commit.h b/src/git/commit.h index 308f30f35..5d3fa0adb 100644 --- a/src/git/commit.h +++ b/src/git/commit.h @@ -108,16 +108,20 @@ GIT_EXTERN(void) git_commit_set_message(git_commit *commit, const char *message) /** * Set the committer of a commit * @param commit the commit object - * @param committer the new committer + * @param name name of the new committer + * @param email email of the new committer + * @param time time when the committer committed the commit */ -GIT_EXTERN(void) git_commit_set_committer(git_commit *commit, const git_person *committer); +GIT_EXTERN(void) git_commit_set_committer(git_commit *commit, const char *name, const char *email, time_t time); /** * Set the author of a commit * @param commit the commit object - * @param author the new author + * @param name name of the new author + * @param email email of the new author + * @param time time when the author created the commit */ -GIT_EXTERN(void) git_commit_set_author(git_commit *commit, const git_person *author); +GIT_EXTERN(void) git_commit_set_author(git_commit *commit, const char *name, const char *email, time_t time); /** * Set the tree which is pointed to by a commit |