Skip to content

Commit

Permalink
use st_clear.
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Sep 16, 2011
1 parent 0ec5526 commit 8514ae6
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions ext/ruby_debug/ruby_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8514ae6

Please sign in to comment.