You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
619 B

#include "e.h"
/* local subsystem functions */
/* local subsystem globals */
static Eina_Hash *store = NULL;
/* externally accessible functions */
E_API void
e_datastore_set(char *key, void *data)
{
if (!store) store = eina_hash_string_superfast_new(NULL);
eina_hash_del(store, key, NULL);
eina_hash_add(store, key, data);
}
E_API void *
e_datastore_get(char *key)
{
return eina_hash_find(store, key);
}
E_API void
e_datastore_del(char *key)
{
eina_hash_del(store, key, NULL);
if (eina_hash_population(store)) return;
eina_hash_free(store);
store = NULL;
}
/* local subsystem functions */