diff options
| author | Patrick Steinhardt <ps@pks.im> | 2018-11-30 12:14:43 +0100 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2019-02-15 13:16:48 +0100 |
| commit | 7e926ef306166993131628b41a13f2b26aaf43de (patch) | |
| tree | 30f8c5930e015536087077fd60aa0f75d0e9f6f9 /src/submodule.c | |
| parent | 351eeff3b2a666b8ead5302c1130629597438df6 (diff) | |
| download | libgit2-7e926ef306166993131628b41a13f2b26aaf43de.tar.gz | |
maps: provide a uniform entry count interface
There currently exist two different function names for getting the entry count
of maps, where offmaps offset and string maps use `num_entries` and OID maps use
`size`. In most programming languages with built-in map types, this is simply
called `size`, which is also shorter to type. Thus, this commit renames the
other two functions `num_entries` to match the common way and adjusts all
callers.
Diffstat (limited to 'src/submodule.c')
| -rw-r--r-- | src/submodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/submodule.c b/src/submodule.c index e11b544a2..72921fa3e 100644 --- a/src/submodule.c +++ b/src/submodule.c @@ -625,7 +625,7 @@ int git_submodule_foreach( goto done; if (!(error = git_vector_init( - &snapshot, git_strmap_num_entries(submodules), submodule_cmp))) { + &snapshot, git_strmap_size(submodules), submodule_cmp))) { git_strmap_foreach_value(submodules, sm, { if ((error = git_vector_insert(&snapshot, sm)) < 0) |
