Commit d49b1365 by Patrick Steinhardt

config_entries: internalize structure declarations

Access to the config entries is now completely done via the modules
function interface and no caller messes with the struct's internals. We
can thus completely move the structure declarations into the
implementation file so that nobody even has a chance to mess with the
members.
parent 123e5963
......@@ -7,11 +7,23 @@
#include "config_entries.h"
typedef struct config_entry_list {
struct config_entry_list *next;
struct config_entry_list *last;
git_config_entry *entry;
} config_entry_list;
typedef struct config_entries_iterator {
git_config_iterator parent;
config_entry_list *head;
} config_entries_iterator;
struct git_config_entries {
git_refcount rc;
git_strmap *map;
config_entry_list *list;
};
static void config_entry_list_free(config_entry_list *list)
{
config_entry_list *next;
......
......@@ -10,17 +10,7 @@
#include "git2/sys/config.h"
#include "config.h"
typedef struct config_entry_list {
struct config_entry_list *next;
struct config_entry_list *last;
git_config_entry *entry;
} config_entry_list;
typedef struct {
git_refcount rc;
git_strmap *map;
config_entry_list *list;
} git_config_entries;
typedef struct git_config_entries git_config_entries;
int git_config_entries_new(git_config_entries **out);
void git_config_entries_incref(git_config_entries *entries);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment