comparison include/jeffpc/nvl.h @ 822:f8d9ccf26563

nvl: add nvl_lookup_val to easily get at the struct val pointer value Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Fri, 30 Oct 2020 17:57:53 -0400
parents 342a128c5011
children ccb955138113
comparison
equal deleted inserted replaced
821:cbde4a6170af 822:f8d9ccf26563
1 /* 1 /*
2 * Copyright (c) 2017-2018 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> 2 * Copyright (c) 2017-2020 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy 4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal 5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights 6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
149 extern int nvl_lookup_int(struct nvlist *nvl, const char *name, uint64_t *out); 149 extern int nvl_lookup_int(struct nvlist *nvl, const char *name, uint64_t *out);
150 extern int nvl_lookup_null(struct nvlist *nvl, const char *name); 150 extern int nvl_lookup_null(struct nvlist *nvl, const char *name);
151 extern const struct nvpair *nvl_lookup(struct nvlist *nvl, const char *name); 151 extern const struct nvpair *nvl_lookup(struct nvlist *nvl, const char *name);
152 extern struct nvlist *nvl_lookup_nvl(struct nvlist *nvl, const char *name); 152 extern struct nvlist *nvl_lookup_nvl(struct nvlist *nvl, const char *name);
153 extern struct str *nvl_lookup_str(struct nvlist *nvl, const char *name); 153 extern struct str *nvl_lookup_str(struct nvlist *nvl, const char *name);
154 extern struct val *nvl_lookup_val(struct nvlist *nvl, const char *name);
154 155
155 /* 156 /*
156 * Add a new key-value pair or change the value of an existing key-value 157 * Add a new key-value pair or change the value of an existing key-value
157 * pair. 158 * pair.
158 * 159 *