summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-12 08:56:31 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-12 08:56:31 +0000
commit7cdc73235aee44599b99a89369edbaa61f4204bc (patch)
treeb7fd1d2970c05754ce0284c883ed1bacaacedbc5 /st.c
parentdd41485efb9e62f36f9319d0cc701862e6a671a8 (diff)
* st.c: use st_index_t for indexes instead of int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'st.c')
-rw-r--r--st.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/st.c b/st.c
index b5d1152..1401ba0 100644
--- a/st.c
+++ b/st.c
@@ -227,7 +227,7 @@ void
st_clear(st_table *table)
{
register st_table_entry *ptr, *next;
- int i;
+ st_index_t i;
if (table->entries_packed) {
table->num_entries = 0;
@@ -284,7 +284,7 @@ st_lookup(st_table *table, register st_data_t key, st_data_t *value)
register st_table_entry *ptr;
if (table->entries_packed) {
- int i;
+ st_index_t i;
for (i = 0; i < table->num_entries; i++) {
if ((st_data_t)table->bins[i*2] == key) {
if (value !=0) *value = (st_data_t)table->bins[i*2+1];
@@ -313,7 +313,7 @@ st_get_key(st_table *table, register st_data_t key, st_data_t *result)
register st_table_entry *ptr;
if (table->entries_packed) {
- int i;
+ st_index_t i;
for (i = 0; i < table->num_entries; i++) {
if ((st_data_t)table->bins[i*2] == key) {
if (result !=0) *result = (st_data_t)table->bins[i*2];
@@ -385,7 +385,7 @@ st_insert(register st_table *table, register st_data_t key, st_data_t value)
register st_table_entry *ptr;
if (table->entries_packed) {
- int i;
+ st_index_t i;
for (i = 0; i < table->num_entries; i++) {
if ((st_data_t)table->bins[i*2] == key) {
table->bins[i*2+1] = (struct st_table_entry*)value;
@@ -536,7 +536,7 @@ st_delete(register st_table *table, register st_data_t *key, st_data_t *value)
register st_table_entry *ptr;
if (table->entries_packed) {
- int i;
+ st_index_t i;
for (i = 0; i < table->num_entries; i++) {
if ((st_data_t)table->bins[i*2] == *key) {
if (value != 0) *value = (st_data_t)table->bins[i*2+1];
@@ -594,7 +594,7 @@ void
st_cleanup_safe(st_table *table, st_data_t never)
{
st_table_entry *ptr, **last, *tmp;
- int i;
+ st_index_t i;
for (i = 0; i < table->num_bins; i++) {
ptr = *(last = &table->bins[i]);
@@ -616,11 +616,11 @@ st_foreach(st_table *table, int (*func)(ANYARGS), st_data_t arg)
{
st_table_entry *ptr, **last, *tmp;
enum st_retval retval;
- int i;
+ st_index_t i;
if (table->entries_packed) {
for (i = 0; i < table->num_entries; i++) {
- int j;
+ st_index_t j;
st_data_t key, val;
key = (st_data_t)table->bins[i*2];
val = (st_data_t)table->bins[i*2+1];