FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove `map_free` macros by pks-t · Pull Request #4166 · libgit2/libgit2 · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (5) .h  (4) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
3 changes: 1 addition & 2 deletions src/checkout.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2319,15 +2319,14 @@ static void checkout_data_clear(checkout_data *data)
git__free(data->pfx);
data->pfx = NULL;

git_strmap_free(data->mkdir_map);

git_buf_free(&data->target_path);
git_buf_free(&data->tmp);

git_index_free(data->index);
data->index = NULL;

git_strmap_free(data->mkdir_map);
data->mkdir_map = NULL;

git_attr_session__free(&data->attr_session);
}
Expand Down
2 changes: 1 addition & 1 deletion src/idxmap.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void git_idxmap_icase_resize(git_idxmap_icase *map, size_t size)
kh_resize(idxicase, map, size);
}

void git_idxmap__free(git_idxmap *map)
void git_idxmap_free(git_idxmap *map)
{
kh_destroy(idx, map);
}
Expand Down
3 changes: 1 addition & 2 deletions src/idxmap.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ int git_idxmap_has_data(git_idxmap *map, size_t idx);

void git_idxmap_resize(git_idxmap *map, size_t size);
void git_idxmap_icase_resize(git_idxmap_icase *map, size_t size);
#define git_idxmap_free(h) git_idxmap__free(h); (h) = NULL
void git_idxmap__free(git_idxmap *map);
void git_idxmap_free(git_idxmap *map);
void git_idxmap_clear(git_idxmap *map);

void git_idxmap_delete_at(git_idxmap *map, size_t idx);
Expand Down
2 changes: 1 addition & 1 deletion src/offmap.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ git_offmap *git_offmap_alloc(void)
return kh_init(off);
}

void git_offmap__free(git_offmap *map)
void git_offmap_free(git_offmap *map)
{
kh_destroy(off, map);
}
Expand Down
3 changes: 1 addition & 2 deletions src/offmap.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ __KHASH_TYPE(off, git_off_t, void *)
typedef khash_t(off) git_offmap;

git_offmap *git_offmap_alloc(void);
#define git_offmap_free(h) git_offmap__free(h); (h) = NULL
void git_offmap__free(git_offmap *map);
void git_offmap_free(git_offmap *map);
void git_offmap_clear(git_offmap *map);

size_t git_offmap_num_entries(git_offmap *map);
Expand Down
2 changes: 1 addition & 1 deletion src/oidmap.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ git_oidmap *git_oidmap_alloc()
return kh_init(oid);
}

void git_oidmap__free(git_oidmap *map)
void git_oidmap_free(git_oidmap *map)
{
kh_destroy(oid, map);
}
Expand Down
3 changes: 1 addition & 2 deletions src/oidmap.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ __KHASH_TYPE(oid, const git_oid *, void *)
typedef khash_t(oid) git_oidmap;

git_oidmap *git_oidmap_alloc(void);
#define git_oidmap_free(h) git_oidmap__free(h); (h) = NULL
void git_oidmap__free(git_oidmap *map);
void git_oidmap_free(git_oidmap *map);
void git_oidmap_clear(git_oidmap *map);

size_t git_oidmap_size(git_oidmap *map);
Expand Down
2 changes: 1 addition & 1 deletion src/strmap.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ int git_strmap_alloc(git_strmap **map)
return 0;
}

void git_strmap__free(git_strmap *map)
void git_strmap_free(git_strmap *map)
{
kh_destroy(str, map);
}
Expand Down
4 changes: 1 addition & 3 deletions src/strmap.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ typedef khash_t(str) git_strmap;
typedef khiter_t git_strmap_iter;

int git_strmap_alloc(git_strmap **map);

#define git_strmap_free(h) git_strmap__free(h); (h) = NULL
void git_strmap__free(git_strmap *map);
void git_strmap_free(git_strmap *map);
void git_strmap_clear(git_strmap *map);

size_t git_strmap_num_entries(git_strmap *map);
Expand Down

Back | FazBrowse Home | New Git URL