# HG changeset patch # User Josef 'Jeff' Sipek # Date 1604095073 14400 # Node ID f8d9ccf2656356e7ac631e27651585c1b4ecdd39 # Parent cbde4a6170af2ff971ade19be57782f1e4f16f55 nvl: add nvl_lookup_val to easily get at the struct val pointer value Signed-off-by: Josef 'Jeff' Sipek diff -r cbde4a6170af -r f8d9ccf26563 include/jeffpc/nvl.h --- a/include/jeffpc/nvl.h Fri Oct 30 17:51:11 2020 -0400 +++ b/include/jeffpc/nvl.h Fri Oct 30 17:57:53 2020 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 Josef 'Jeff' Sipek + * Copyright (c) 2017-2020 Josef 'Jeff' Sipek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -151,6 +151,7 @@ extern const struct nvpair *nvl_lookup(struct nvlist *nvl, const char *name); extern struct nvlist *nvl_lookup_nvl(struct nvlist *nvl, const char *name); extern struct str *nvl_lookup_str(struct nvlist *nvl, const char *name); +extern struct val *nvl_lookup_val(struct nvlist *nvl, const char *name); /* * Add a new key-value pair or change the value of an existing key-value diff -r cbde4a6170af -r f8d9ccf26563 mapfile-vers --- a/mapfile-vers Fri Oct 30 17:51:11 2020 -0400 +++ b/mapfile-vers Fri Oct 30 17:57:53 2020 -0400 @@ -170,6 +170,7 @@ nvl_lookup_null; nvl_lookup_nvl; nvl_lookup_str; + nvl_lookup_val; nvl_merge; nvl_set; nvl_set_array; diff -r cbde4a6170af -r f8d9ccf26563 nvl.c --- a/nvl.c Fri Oct 30 17:51:11 2020 -0400 +++ b/nvl.c Fri Oct 30 17:57:53 2020 -0400 @@ -114,6 +114,7 @@ LOOKUP_PTR(nvl_lookup_nvl, struct nvlist *, nvpair_value_nvl); LOOKUP_PTR(nvl_lookup_str, struct str *, nvpair_value_str); +LOOKUP_PTR(nvl_lookup_val, struct val *, nvpair_value); /* * nvlist set