develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35903 - trunk/src/io

From:
chromatic
Date:
January 22, 2009 18:02
Subject:
[svn:parrot] r35903 - trunk/src/io
Message ID:
20090123020244.B1590CB9AE@x12.develooper.com
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 +



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About