Permalink
Browse files

Fix record separator bug on io handles

Handle PMC is not not instantiated itself but is only inherited. The
sub-PMCs (Filehandle, Socket, Stringhandle) should mark all of the
Handle attributes as alive.
  • Loading branch information...
1 parent 193190b commit 3c558c8a54ee87699e9426f111d21db59dd38b36 luben committed Oct 21, 2012
Showing with 3 additions and 0 deletions.
  1. +1 −0 src/pmc/filehandle.pmc
  2. +1 −0 src/pmc/socket.pmc
  3. +1 −0 src/pmc/stringhandle.pmc
View
@@ -146,6 +146,7 @@ Mark active filehandle data as live.
Parrot_gc_mark_STRING_alive(INTERP, attrs->mode);
Parrot_gc_mark_STRING_alive(INTERP, attrs->filename);
Parrot_gc_mark_STRING_alive(INTERP, attrs->encoding);
+ Parrot_gc_mark_STRING_alive(INTERP, attrs->record_separator);
Parrot_io_buffer_mark(interp, attrs->read_buffer);
Parrot_io_buffer_mark(interp, attrs->write_buffer);
}
View
@@ -99,6 +99,7 @@ Mark active socket handle data as live.
if (data) {
Parrot_gc_mark_PMC_alive(INTERP, data->local);
Parrot_gc_mark_PMC_alive(INTERP, data->remote);
+ Parrot_gc_mark_STRING_alive(INTERP, data->record_separator);
Parrot_io_buffer_mark(interp, data->read_buffer);
Parrot_io_buffer_mark(interp, data->write_buffer);
}
View
@@ -136,6 +136,7 @@ Mark active stringhandle data as live.
Parrot_gc_mark_STRING_alive(INTERP, data_struct->mode);
Parrot_gc_mark_STRING_alive(INTERP, data_struct->encoding);
Parrot_gc_mark_STRING_alive(INTERP, data_struct->filename);
+ Parrot_gc_mark_STRING_alive(INTERP, data_struct->record_separator);
Parrot_io_buffer_mark(interp, data_struct->read_buffer);
Parrot_io_buffer_mark(interp, data_struct->write_buffer);
}

2 comments on commit 3c558c8

Owner

pmichaud replied Oct 21, 2012

Why does Socket PMC not mark the encoding string for GC?

Pm

Member

luben replied Oct 21, 2012

Another omission it seems. Fixing it

Please sign in to comment.