diff options
author | N.N. <krzyszcz@users.sourceforge.net> | 2003-09-26 07:29:14 +0000 |
---|---|---|
committer | N.N. <krzyszcz@users.sourceforge.net> | 2003-09-26 07:29:14 +0000 |
commit | 822b6eabf733011dbbb8b22b0daa860578182eac (patch) | |
tree | 254cca6d2f77c7103a29829a24b7dfdc9c33efa5 /shared/common/dict.h | |
parent | 9680b47879dfc58f884208f7abf2f945b3b41d25 (diff) |
*** empty log message ***
svn path=/trunk/externals/miXed/; revision=1046
Diffstat (limited to 'shared/common/dict.h')
-rw-r--r-- | shared/common/dict.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/shared/common/dict.h b/shared/common/dict.h new file mode 100644 index 0000000..807bf9b --- /dev/null +++ b/shared/common/dict.h @@ -0,0 +1,27 @@ +/* Copyright (c) 2002-2003 krzYszcz and others. + * For information on usage and redistribution, and for a DISCLAIMER OF ALL + * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ + +#ifndef __DICT_H__ +#define __DICT_H__ + +typedef struct _dict +{ + size_t d_hashsize; + t_symbol **d_hashtable; + t_class *d_bindlist_class; +} t_dict; + +typedef int (*t_dict_hook)(t_pd *x, void *arg); + +t_dict *dict_new(size_t hashsize); +void dict_free(t_dict *x); +t_symbol *dict_dokey(t_dict *x, char *s, t_symbol *oldsym); +t_symbol *dict_key(t_dict *x, char *s); +void dict_bind(t_dict *x, t_pd *obj, t_symbol *s); +void dict_unbind(t_dict *x, t_pd *obj, t_symbol *s); +t_pd *dict_value(t_dict *x, t_symbol *s); +t_pd *dict_xvalue(t_dict *x, t_symbol *s); +int dict_forall(t_dict *x, t_symbol *s, t_dict_hook hook, void *hookarg); + +#endif |