summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2022-08-05 21:43:47 -0300
committermrb0nk500 <b0nk@b0nk.xyz>2022-08-05 21:49:29 -0300
commit2898adab6fde190d09f87cac58862c67ee193559 (patch)
tree7e0575564952a14c07a747e8968aa7a490713844 /config.h
parent16f20cd4834c6a004246a80ca18033ca80224b56 (diff)
keyword: Add `get_keyword_cb`, and add `get_callback` to `struct keyword`
This will be used for creating a getter callback for keywords. I also renamed `keyword_cb` to `set_keyword_cb`, aswell as renamed `callback` to `set_callback` in `struct keyword`.
Diffstat (limited to 'config.h')
-rw-r--r--config.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/config.h b/config.h
index 4d35af6..7380061 100644
--- a/config.h
+++ b/config.h
@@ -20,13 +20,13 @@ int check_port(void *ctx, void *ret, const keyword *key, keyword_val val);
#define offset_list(...) (size_t []){__VA_ARGS__, -1}
static const keyword *config_keywords[] = {
- &(const keyword){"git-root", "Root of git server (can also be a url).", NULL, TYPE_STRING, offset_list(offsetof(config, git_root)), NULL},
- &(const keyword){"socket-type", "Socket type to use (options: unix, network. default: network).", NULL, TYPE_STRING, offset_list(offsetof(config, sock_type)), NULL},
- &(const keyword){"socket", "Path, IP address, or domain name of socket.", NULL, TYPE_STRING, offset_list(offsetof(config, sock)), NULL},
- &(const keyword){"port", "Port to listen on (network socket only).", NULL, TYPE_STRING, offset_list(offsetof(config, port)), check_port},
- &(const keyword){"merge-type", "Type of merge (options: 0 = Merge individually, 1 = Merge into one).", NULL, TYPE_INT, offset_list(offsetof(config, merge_type)), NULL},
- &(const keyword){"pr-root", "Directory to store pull requests in.", NULL, TYPE_STRING, offset_list(offsetof(config, pr_root)), NULL},
- &(const keyword){"key-file", "Path to file containing gpg/pgp public keys of each maintainer.", NULL, TYPE_STRING, offset_list(offsetof(config, key_path)), NULL},
+ &(const keyword){"git-root", "Root of git server (can also be a url).", NULL, TYPE_STRING, offset_list(offsetof(config, git_root)), NULL, NULL},
+ &(const keyword){"socket-type", "Socket type to use (options: unix, network. default: network).", NULL, TYPE_STRING, offset_list(offsetof(config, sock_type)), NULL, NULL},
+ &(const keyword){"socket", "Path, IP address, or domain name of socket.", NULL, TYPE_STRING, offset_list(offsetof(config, sock)), NULL, NULL},
+ &(const keyword){"port", "Port to listen on (network socket only).", NULL, TYPE_STRING, offset_list(offsetof(config, port)), check_port, NULL},
+ &(const keyword){"merge-type", "Type of merge (options: 0 = Merge individually, 1 = Merge into one).", NULL, TYPE_INT, offset_list(offsetof(config, merge_type)), NULL, NULL},
+ &(const keyword){"pr-root", "Directory to store pull requests in.", NULL, TYPE_STRING, offset_list(offsetof(config, pr_root)), NULL, NULL},
+ &(const keyword){"key-file", "Path to file containing gpg/pgp public keys of each maintainer.", NULL, TYPE_STRING, offset_list(offsetof(config, key_path)), NULL, NULL},
NULL,
};
#undef offset_list