diff options
author | bapt <bapt@FreeBSD.org> | 2014-04-22 22:02:06 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2014-04-22 22:02:06 +0000 |
commit | 8286a6069a68d13dc8ef55a25885a57aa127dde3 (patch) | |
tree | 72be8a76cd83688338f881c969e6dfc0583ec8ff /usr.sbin | |
parent | 418b7ad78192cd30c84465a025da93f4d87a8491 (diff) | |
download | FreeBSD-src-8286a6069a68d13dc8ef55a25885a57aa127dde3.zip FreeBSD-src-8286a6069a68d13dc8ef55a25885a57aa127dde3.tar.gz |
Import libucl 0.4.0
Adapt pkg(7) to the new libucl API
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg/config.c | 8 | ||||
-rw-r--r-- | usr.sbin/pkg/pkg.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/pkg/config.c b/usr.sbin/pkg/config.c index e46da4a..fded95e 100644 --- a/usr.sbin/pkg/config.c +++ b/usr.sbin/pkg/config.c @@ -517,10 +517,10 @@ boolstr_to_bool(const char *str) } static void -config_parse(ucl_object_t *obj, pkg_conf_file_t conftype) +config_parse(const ucl_object_t *obj, pkg_conf_file_t conftype) { struct sbuf *buf = sbuf_new_auto(); - ucl_object_t *cur, *seq; + const ucl_object_t *cur, *seq; ucl_object_iter_t it = NULL, itseq = NULL; struct config_entry *temp_config; struct config_value *cv; @@ -638,7 +638,7 @@ static void parse_repo_file(ucl_object_t *obj) { ucl_object_iter_t it = NULL; - ucl_object_t *cur; + const ucl_object_t *cur; const char *key; while ((cur = ucl_iterate_object(obj, &it, true))) { @@ -683,7 +683,7 @@ read_conf_file(const char *confpath, pkg_conf_file_t conftype) parse_repo_file(obj); } - ucl_object_free(obj); + ucl_object_unref(obj); ucl_parser_free(p); return (0); diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c index 545d6dc..1b1a01c 100644 --- a/usr.sbin/pkg/pkg.c +++ b/usr.sbin/pkg/pkg.c @@ -270,7 +270,7 @@ cleanup: static struct fingerprint * parse_fingerprint(ucl_object_t *obj) { - ucl_object_t *cur; + const ucl_object_t *cur; ucl_object_iter_t it = NULL; const char *function, *fp, *key; struct fingerprint *f; @@ -349,7 +349,7 @@ load_fingerprint(const char *dir, const char *filename) if (f != NULL) f->name = strdup(filename); - ucl_object_free(obj); + ucl_object_unref(obj); ucl_parser_free(p); return (f); |