diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-10 16:28:56 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-10 16:28:56 +0000 |
commit | b28ce966c75b1ac243ca8a43cdd7e51d856828c5 (patch) | |
tree | 29bc33a79020c953b5483e1b16225ca8df315e1a /st.c | |
parent | d4f37a5532b06462e958281fe51ed3a3c8f18b67 (diff) | |
download | ruby-b28ce966c75b1ac243ca8a43cdd7e51d856828c5.tar.gz |
st.c: revert st_keys
* st.c: revert st_keys() at r43238. VALUE cannot be in st.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 31 |
1 files changed, 0 insertions, 31 deletions
@@ -1091,37 +1091,6 @@ st_foreach(st_table *table, int (*func)(ANYARGS), st_data_t arg) return 0; } -VALUE -st_keys(st_table *table) -{ - st_table_entry *ptr = NULL; - st_data_t key, never = (st_data_t)Qundef; - VALUE keys = rb_ary_new_capa(table->num_entries); - - if (table->entries_packed) { - st_index_t i; - - for (i = 0; i < table->real_entries; i++) { - key = PKEY(table, i); - if (key == never) continue; - rb_ary_push(keys, (VALUE)key); - } - } - else { - ptr = table->head; - } - - if (ptr != 0) { - do { - key = ptr->key; - if (key != never) rb_ary_push(keys, (VALUE)key); - ptr = ptr->fore; - } while (ptr && table->head); - } - - return keys; -} - #if 0 /* unused right now */ int st_reverse_foreach(st_table *table, int (*func)(ANYARGS), st_data_t arg) |