зеркало из https://github.com/github/ruby.git
st.c: adjust style
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8c57548d53
Коммит
2cc3946d0e
30
st.c
30
st.c
|
@ -970,7 +970,8 @@ find_table_bin_ind_direct(st_table *tab, st_hash_t hash_value, st_data_t key)
|
|||
UNDEFINED_ENTRY_IND if it is not found. */
|
||||
static st_index_t
|
||||
find_table_bin_ptr_and_reserve(st_table *tab, st_hash_t *hash_value,
|
||||
st_data_t key, st_index_t *bin_ind) {
|
||||
st_data_t key, st_index_t *bin_ind)
|
||||
{
|
||||
st_index_t ind;
|
||||
st_hash_t curr_hash_value = *hash_value;
|
||||
#ifdef QUADRATIC_PROBE
|
||||
|
@ -1136,7 +1137,8 @@ st_insert(st_table *tab, st_data_t key, st_data_t value)
|
|||
entry with KEY before the insertion. */
|
||||
static inline void
|
||||
st_add_direct_with_hash(st_table *tab,
|
||||
st_data_t key, st_data_t value, st_hash_t hash) {
|
||||
st_data_t key, st_data_t value, st_hash_t hash)
|
||||
{
|
||||
st_table_entry *entry;
|
||||
st_index_t ind;
|
||||
st_index_t bin_ind;
|
||||
|
@ -1174,7 +1176,8 @@ st_add_direct(st_table *tab, st_data_t key, st_data_t value)
|
|||
and update the value of the found entry. */
|
||||
int
|
||||
st_insert2(st_table *tab, st_data_t key, st_data_t value,
|
||||
st_data_t (*func)(st_data_t)) {
|
||||
st_data_t (*func)(st_data_t))
|
||||
{
|
||||
st_table_entry *entry;
|
||||
st_index_t bin;
|
||||
st_index_t ind, check;
|
||||
|
@ -1310,7 +1313,8 @@ st_delete(st_table *tab, st_data_t *key, st_data_t *value)
|
|||
traversing without a specific way to do this. */
|
||||
int
|
||||
st_delete_safe(st_table *tab, st_data_t *key, st_data_t *value,
|
||||
st_data_t never ATTRIBUTE_UNUSED) {
|
||||
st_data_t never ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return st_general_delete(tab, key, value);
|
||||
}
|
||||
|
||||
|
@ -1364,7 +1368,8 @@ st_shift(st_table *tab, st_data_t *key, st_data_t *value)
|
|||
/* See comments for function st_delete_safe. */
|
||||
void
|
||||
st_cleanup_safe(st_table *tab ATTRIBUTE_UNUSED,
|
||||
st_data_t never ATTRIBUTE_UNUSED) {
|
||||
st_data_t never ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
/* Find entry with KEY in table TAB, call FUNC with the key and the
|
||||
|
@ -1377,7 +1382,8 @@ st_cleanup_safe(st_table *tab ATTRIBUTE_UNUSED,
|
|||
in the table before the call. */
|
||||
int
|
||||
st_update(st_table *tab, st_data_t key,
|
||||
st_update_callback_func *func, st_data_t arg) {
|
||||
st_update_callback_func *func, st_data_t arg)
|
||||
{
|
||||
st_table_entry *entry = NULL; /* to avoid uninitialized value warning */
|
||||
st_index_t bin = 0; /* Ditto */
|
||||
st_table_entry *entries;
|
||||
|
@ -1450,7 +1456,8 @@ st_update(st_table *tab, st_data_t key,
|
|||
during traversing. */
|
||||
static inline int
|
||||
st_general_foreach(st_table *tab, int (*func)(ANYARGS), st_data_t arg,
|
||||
int check_p) {
|
||||
int check_p)
|
||||
{
|
||||
st_index_t bin;
|
||||
st_index_t bin_ind;
|
||||
st_table_entry *entries, *curr_entry_ptr;
|
||||
|
@ -1543,7 +1550,8 @@ st_foreach(st_table *tab, int (*func)(ANYARGS), st_data_t arg)
|
|||
/* See comments for function st_delete_safe. */
|
||||
int
|
||||
st_foreach_check(st_table *tab, int (*func)(ANYARGS), st_data_t arg,
|
||||
st_data_t never ATTRIBUTE_UNUSED) {
|
||||
st_data_t never ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return st_general_foreach(tab, func, arg, TRUE);
|
||||
}
|
||||
|
||||
|
@ -1580,7 +1588,8 @@ st_keys(st_table *tab, st_data_t *keys, st_index_t size)
|
|||
/* See comments for function st_delete_safe. */
|
||||
st_index_t
|
||||
st_keys_check(st_table *tab, st_data_t *keys, st_index_t size,
|
||||
st_data_t never ATTRIBUTE_UNUSED) {
|
||||
st_data_t never ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return st_general_keys(tab, keys, size);
|
||||
}
|
||||
|
||||
|
@ -1617,7 +1626,8 @@ st_values(st_table *tab, st_data_t *values, st_index_t size)
|
|||
/* See comments for function st_delete_safe. */
|
||||
st_index_t
|
||||
st_values_check(st_table *tab, st_data_t *values, st_index_t size,
|
||||
st_data_t never ATTRIBUTE_UNUSED) {
|
||||
st_data_t never ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return st_general_values(tab, values, size);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче