[svn:parrot] r35903 - trunk/src/io
[email protected] Thu, 22 Jan 2009 18:02:44 -0800 (PST)
| Newsgroups | perl.cvs.parrot |
|---|---|
| Message-ID | <[email protected]> |
Author: chromatic
Date: Thu Jan 22 18:02:44 2009
New Revision: 35903
Modified:
trunk/src/io/buffer.c
Log:
[IO] Removed a no-op setting the start of a buffer to itself when writing from
an IO buffer. All Parrot and Rakudo tests still pass.
Modified: trunk/src/io/buffer.c
==============================================================================
--- trunk/src/io/buffer.c (original)
+++ trunk/src/io/buffer.c Thu Jan 22 18:02:44 2009
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2008, The Perl Foundation.
+Copyright (C) 2001-2009, The Perl Foundation.
$Id$
=head1 NAME
@@ -634,6 +634,7 @@
else if (avail > len) {
buffer_flags |= PIO_BF_WRITEBUF;
Parrot_io_set_buffer_flags(interp, filehandle, buffer_flags);
+
memmove(buffer_next, buffer, len);
buffer_next += len;
Parrot_io_set_buffer_next(interp, filehandle, buffer_next);
@@ -654,9 +655,10 @@
Parrot_io_set_file_position(interp, filehandle, (avail +
Parrot_io_get_file_position(interp, filehandle)));
Parrot_io_flush(interp, filehandle);
+
buffer_next = Parrot_io_get_buffer_next(interp, filehandle);
memmove(buffer_start, ((const char *)buffer + avail), diff);
- Parrot_io_set_buffer_start(interp, filehandle, buffer_start);
+
buffer_next += diff;
Parrot_io_set_buffer_next(interp, filehandle, buffer_next);
Parrot_io_set_file_position(interp, filehandle, (diff +