diff options
author | Patrick Steinhardt <ps@pks.im> | 2018-08-10 18:59:59 +0200 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2018-09-28 11:14:13 +0200 |
commit | 123e5963e169c160034b19a3d9df60f65cfa09a8 (patch) | |
tree | f2093ef34f4df4c3c48c3e8d6679129885b20d6c /src/config_file.c | |
parent | 5a7e0b3c380652e666f0bf0d0c5ff6cd3c846419 (diff) | |
download | libgit2-123e5963e169c160034b19a3d9df60f65cfa09a8.tar.gz |
config_entries: abstract away reference counting
Instead of directly calling `git_atomic_inc` in users of the config
entries store, provide a `git_config_entries_incref` function to further
decouple the interfaces. Convert the refcount to a `git_refcount`
structure while at it.
Diffstat (limited to 'src/config_file.c')
-rw-r--r-- | src/config_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config_file.c b/src/config_file.c index 8c05fd973..7a7f35f06 100644 --- a/src/config_file.c +++ b/src/config_file.c @@ -88,7 +88,7 @@ static git_config_entries *diskfile_entries_take(diskfile_header *h) } entries = h->entries; - git_atomic_inc(&entries->refcount); + git_config_entries_incref(entries); git_mutex_unlock(&h->values_mutex); |