Permalink
Browse files

[GH 811] fix seek() sign-conversion error

Nicholas Clark correctly analyzed it by studying strace.
Andy Dougherty came with the patch. Confirmed by rurban.
  • Loading branch information...
1 parent 352010e commit 0cc54e6972ae830e7943a15c8db1e14fc9c3cb90 Andy Dougherty committed with Reini Urban Sep 4, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/io/utilities.c
  2. +1 −1 t/pmc/filehandle.t
View
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2008, Parrot Foundation.
+Copyright (C) 2001-2012, Parrot Foundation.
=head1 NAME
@@ -551,7 +551,7 @@ io_sync_buffers_for_write(PARROT_INTERP, ARGMOD(PMC *handle),
if (read_buffer && !BUFFER_IS_EMPTY(read_buffer)) {
const size_t buffer_size = BUFFER_USED_SIZE(read_buffer);
Parrot_io_buffer_clear(interp, read_buffer);
- vtable->seek(interp, handle, -buffer_size, SEEK_CUR);
+ vtable->seek(interp, handle, -(PIOOFF_T)buffer_size, SEEK_CUR);
}
}
View
@@ -926,7 +926,7 @@ CODE
-1
OUT
-pir_output_is( <<"CODE", <<'OUT', 'write after buffered read', todo => 'GH #811 Write error: No space left on device on swap fs' );
+pir_output_is( <<"CODE", <<'OUT', 'write after buffered read' );
.sub test :main
.local pmc fh
.local string str

0 comments on commit 0cc54e6

Please sign in to comment.