Permalink
Browse files

use st_clear.

  • Loading branch information...
1 parent 0ec5526 commit 8514ae6ec2c881b965bb40b7d6d55eb5b9a83904 @nobu nobu committed Sep 16, 2011
Showing with 1 addition and 7 deletions.
  1. +1 −7 ext/ruby_debug/ruby_debug.c
View
8 ext/ruby_debug/ruby_debug.c
@@ -253,19 +253,13 @@ threads_table_create(void)
return Data_Wrap_Struct(cThreadsTable, threads_table_mark, threads_table_free, threads_table);
}
-static int
-threads_table_clear_i(st_data_t key, st_data_t value, st_data_t dummy)
-{
- return ST_DELETE;
-}
-
static void
threads_table_clear(VALUE table)
{
threads_table_t *threads_table;
Data_Get_Struct(table, threads_table_t, threads_table);
- st_foreach(threads_table->tbl, threads_table_clear_i, 0);
+ st_clear(threads_table->tbl);
}
static VALUE

0 comments on commit 8514ae6

Please sign in to comment.