78 uint32_t(*hash)(
const void *a),
79 int(*equals)(
const void *a,
const void *b));
389 char *oldkey, *oldval;
390 if (
zhash_put(
zh, &key, &value, &oldkey, &oldval)) {
415 uint32_t a = *((
int*) _a);
424 int a = *((
int*) _a);
425 int b = *((
int*) _b);
and restrictions which apply to each piece of software is included later in this file and or inside of the individual applicable source files The disclaimer of warranty in the WPILib license above applies to all code in and nothing in any of the other licenses gives permission to use the names of FIRST nor the names of the WPILib contributors to endorse or promote products derived from this software The following pieces of software have additional or alternate and or and nanopb were all modified for use in Google Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *Neither the name of Google Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT OR EVEN IF ADVISED OF THE POSSIBILITY OF SUCH January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation and configuration files Object form shall mean any form resulting from mechanical transformation or translation of a Source including but not limited to compiled object generated and conversions to other media types Work shall mean the work of whether in Source or Object made available under the as indicated by a copyright notice that is included in or attached to the whether in Source or Object that is based or other modifications as a an original work of authorship For the purposes of this Derivative Works shall not include works that remain separable or merely the Work and Derivative Works thereof Contribution shall mean any work of including the original version of the Work and any modifications or additions to that Work or Derivative Works that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner For the purposes of this submitted means any form of or written communication sent to the Licensor or its including but not limited to communication on electronic mailing source code control and issue tracking systems that are managed or on behalf the Licensor for the purpose of discussing and improving the but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as Not a Contribution Contributor shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work Grant of Copyright License Subject to the terms and conditions of this each Contributor hereby grants to You a non no royalty free
Definition ThirdPartyNotices.txt:164
int last_entry
Definition zhash.h:63
zhash_t * zh
Definition zhash.h:61
const zhash_t * czh
Definition zhash.h:62
static zhash_t * zhash_str_str_create(void)
Definition zhash.h:368
int zhash_remove(zhash_t *zh, const void *key, void *oldkey, void *oldvalue)
Removes from the zhash table the key/value pair for the supplied key, if it exists.
int zhash_get_volatile(const zhash_t *zh, const void *key, void *out_p)
Similar to zhash_get(), but more dangerous.
void zhash_destroy(zhash_t *zh)
Frees all resources associated with the hash table structure which was created by zhash_create().
void zhash_iterator_init(zhash_t *zh, zhash_iterator_t *zit)
Initializes an iterator which can be used to traverse the key/value pairs of the supplied zhash table...
int zhash_put(zhash_t *zh, const void *key, const void *value, void *oldkey, void *oldvalue)
Adds a key/value pair to the hash table, if the supplied key does not already exist in the table,...
uint32_t zhash_ptr_hash(const void *a)
Defines a hash function which will calculate a zhash value for pointer input data.
void zhash_iterator_remove(zhash_iterator_t *zit)
Removes from the zhash table the key/value pair most recently returned via a call to zhash_iterator_n...
int zhash_get(const zhash_t *zh, const void *key, void *out_value)
Retrieves the value for the given key, if it exists, by copying its contents into the space pointed t...
static uint32_t zhash_int_hash(const void *_a)
Definition zhash.h:411
int zhash_uint64_equals(const void *a, const void *b)
Defines a function to compare zhash values for uint64_t input data.
int zhash_uint32_equals(const void *a, const void *b)
Defines a function to compare zhash values for uint32_t input data.
static int zhash_int_equals(const void *_a, const void *_b)
Definition zhash.h:419
void zhash_iterator_init_const(const zhash_t *zh, zhash_iterator_t *zit)
Initializes an iterator which can be used to traverse the key/value pairs of the supplied zhash table...
int zhash_iterator_next_volatile(zhash_iterator_t *zit, void *outkey, void *outvalue)
Similar to zhash_iterator_next() except that it retrieves a pointer to zhash's internal storage.
int zhash_str_equals(const void *a, const void *b)
Defines a function to compare zhash values for string input data.
zhash_t * zhash_copy(const zhash_t *other)
Creates and returns a new identical copy of the zhash (i.e.
int zhash_size(const zhash_t *zh)
Retrieves the current number of key/value pairs currently contained in the zhash table,...
void zhash_debug(zhash_t *zh)
uint32_t zhash_uint64_hash(const void *a)
Defines a hash function which will calculate a zhash value for uint64_t input data.
static void zhash_str_str_destroy(zhash_t *zh)
Definition zhash.h:396
zarray_t * zhash_keys(const zhash_t *zh)
Returns an array which contains copies of all of the hash table's keys, in no particular order.
int zhash_iterator_next(zhash_iterator_t *zit, void *outkey, void *outvalue)
Retrieves the next key/value pair from a zhash table via the (previously- initialized) iterator.
zarray_t * zhash_values(const zhash_t *zh)
Returns an array which contains copies of all of the hash table's values, in no particular order.
void zhash_map_values(zhash_t *zh, void(*f)(void *))
Calls the supplied function with a pointer to every value in the hash table in turn.
int zhash_ptr_equals(const void *a, const void *b)
Defines a function to compare zhash values for pointer input data.
void zhash_map_keys(zhash_t *zh, void(*f)(void *))
Calls the supplied function with a pointer to every key in the hash table in turn.
int zhash_contains(const zhash_t *zh, const void *key)
Determines whether the supplied key value exists as an entry in the zhash table.
struct zhash zhash_t
A hash table for structs and primitive types that stores entries by value.
Definition zhash.h:54
void zhash_vmap_values(zhash_t *vh, void(*f)(void *))
Calls the supplied function with a copy of every value in the hash table in turn.
void zhash_clear(zhash_t *zh)
Removes all entries in the has table to create the equivalent of starting from a zhash_create(),...
void zhash_vmap_keys(zhash_t *vh, void(*f)(void *))
Calls the supplied function with a copy of every key in the hash table in turn.
static void zhash_str_str_put(zhash_t *zh, char *key, char *value)
Definition zhash.h:387
uint32_t zhash_str_hash(const void *a)
Defines a hash function which will calculate a zhash value for string input data.
uint32_t zhash_uint32_hash(const void *a)
Defines a hash function which will calculate a zhash value for uint32_t input data.
static char * zhash_str_str_get(zhash_t *zh, const char *key)
Definition zhash.h:379
zhash_t * zhash_create(size_t keysz, size_t valuesz, uint32_t(*hash)(const void *a), int(*equals)(const void *a, const void *b))
Create, initializes, and returns an empty hash table structure.