config: Rename the `delete` callback name `delete` is a reserved keyword in C++.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/include/git2/config.h b/include/git2/config.h
index f78fe40..ffafd79 100644
--- a/include/git2/config.h
+++ b/include/git2/config.h
@@ -30,7 +30,7 @@ struct git_config_file {
int (*open)(struct git_config_file *);
int (*get)(struct git_config_file *, const char *key, const char **value);
int (*set)(struct git_config_file *, const char *key, const char *value);
- int (*delete)(struct git_config_file *, const char *key);
+ int (*del)(struct git_config_file *, const char *key);
int (*foreach)(struct git_config_file *, int (*fn)(const char *, const char *, void *), void *data);
void (*free)(struct git_config_file *);
};
diff --git a/src/config.c b/src/config.c
index ed7c947..f8ff050 100644
--- a/src/config.c
+++ b/src/config.c
@@ -171,7 +171,7 @@ int git_config_delete(git_config *cfg, const char *name)
internal = git_vector_get(&cfg->files, 0);
file = internal->file;
- return file->delete(file, name);
+ return file->del(file, name);
}
/**************
diff --git a/src/config_file.c b/src/config_file.c
index afa917a..1358719 100644
--- a/src/config_file.c
+++ b/src/config_file.c
@@ -452,7 +452,7 @@ int git_config_file__ondisk(git_config_file **out, const char *path)
backend->parent.open = config_open;
backend->parent.get = config_get;
backend->parent.set = config_set;
- backend->parent.delete = config_delete;
+ backend->parent.del = config_delete;
backend->parent.foreach = file_foreach;
backend->parent.free = backend_free;