mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2322a13127
commit
3a7020854d
9 changed files with 68 additions and 27 deletions
6
st.c
6
st.c
|
@ -62,10 +62,10 @@ static void rehash();
|
|||
#define alloc(type) (type*)xmalloc((unsigned)sizeof(type))
|
||||
#define Calloc(n,s) (char*)xcalloc((n),(s))
|
||||
|
||||
#define EQUAL(table, x, y) ((*table->type->compare)(x, y) == 0)
|
||||
#define EQUAL(table,x,y) ((x)==(y) || (*table->type->compare)((x),(y)) == 0)
|
||||
|
||||
#define do_hash(key, table) (unsigned int)(*(table)->type->hash)((key))
|
||||
#define do_hash_bin(key, table) (do_hash(key, table)&(table)->num_bins)
|
||||
#define do_hash(key,table) (unsigned int)(*(table)->type->hash)((key))
|
||||
#define do_hash_bin(key,table) (do_hash(key, table)&(table)->num_bins)
|
||||
|
||||
/*
|
||||
* MINSIZE is the minimum size of a dictionary.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue