diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-26 00:46:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-26 00:46:34 +0000 |
commit | 1ad4669b1d0a31b71a2ec7322b5af0adb6778256 (patch) | |
tree | 11dbe3d06f4628038eb5d3a9d8ba0bc8876ed979 /id_table.c | |
parent | 9e585466736afbb7b565a6b3cc1ef7f0bab9cbc3 (diff) | |
download | ruby-1ad4669b1d0a31b71a2ec7322b5af0adb6778256.tar.gz |
id_table.c: constify
* id_table.c (find_empty): constify static data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'id_table.c')
-rw-r--r-- | id_table.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/id_table.c b/id_table.c index 08a94519c2..90921da357 100644 --- a/id_table.c +++ b/id_table.c @@ -822,13 +822,13 @@ find_empty(register sa_table* table, register sa_index_t pos) { sa_index_t new_pos = table->free_pos-1; sa_entry *entry; - static unsigned offsets[][3] = { - {1, 2, 3}, - {2, 3, 0}, - {3, 1, 0}, - {2, 1, 0} + static const unsigned offsets[][3] = { + {1, 2, 3}, + {2, 3, 0}, + {3, 1, 0}, + {2, 1, 0} }; - unsigned *check = offsets[pos&3]; + const unsigned *const check = offsets[pos&3]; pos &= FLOOR_TO_4; entry = table->entries+pos; |