Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Sep 18, 2012
1 parent faba4e9 commit f2438f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ext/rblineprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,16 @@ cleanup_files(st_data_t key, st_data_t record, st_data_t arg)
static int
summarize_files(st_data_t key, st_data_t record, st_data_t arg)
{
VALUE ret = (VALUE)arg;
sourcefile_t *sourcefile = (sourcefile_t*)record;
if (!sourcefile || (VALUE)sourcefile == Qnil) return ST_CONTINUE;
long i;

VALUE ret = (VALUE)arg;
VALUE ary = rb_ary_new();
long i;

for (i=0; i<sourcefile->nlines; i++)
rb_ary_store(ary, i, ULL2NUM(sourcefile->lines[i]));

rb_hash_aset(ret, rb_str_new2(sourcefile->filename), ary);

return ST_CONTINUE;
Expand Down

0 comments on commit f2438f3

Please sign in to comment.