Plan 9 from Bell Labs’s /usr/web/sources/contrib/de0u/root/sys/src/cmd/divergefs/dictionary.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.



typedef struct Dictionary Dictionary;
#pragma incomplete Dictionary /* See 9fans "new compiler" 2005-01-07 */

Dictionary *dictionary_new(collectionisequal isequal, collectionhash hash);

void dictionary_free(Dictionary *self);

void dictionary_free_with(Dictionary *self, 
  functionunary free_key, functionunary free_value);

/** returns true if it was added, false if it exists and value was updated */
bool dictionary_add(Dictionary *self, void *key, void *value);

bool dictionary_remove(Dictionary *self, void *key);

void *dictionary_at(Dictionary *self, void *key);

bool dictionary_get_key_value(Dictionary *self, void **key, void **value);

bool dictionary_get(Dictionary *self, void *key, void **value);

bool dictionary_includes(Dictionary *self, void *key);

uint dictionary_size(Dictionary *self);



Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].