iliaa           Fri Apr 29 15:01:34 2005 EDT

  Modified files:              
    /php-src/main/streams       streams.c 
  Log:
  Attempt to eliminate seek() prior to every write.
  
  
http://cvs.php.net/diff.php/php-src/main/streams/streams.c?r1=1.76&r2=1.77&ty=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.76 php-src/main/streams/streams.c:1.77
--- php-src/main/streams/streams.c:1.76 Mon Apr 11 11:19:27 2005
+++ php-src/main/streams/streams.c      Fri Apr 29 15:01:33 2005
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: streams.c,v 1.76 2005/04/11 15:19:27 tony2001 Exp $ */
+/* $Id: streams.c,v 1.77 2005/04/29 19:01:33 iliaa Exp $ */
 
 #define _GNU_SOURCE
 #include "php.h"
@@ -892,7 +892,7 @@
        /* if we have a seekable stream we need to ensure that data is written 
at the
         * current stream->position. This means invalidating the read buffer 
and then
         * performing a low-level seek */
-       if (stream->ops->seek && (stream->flags & PHP_STREAM_FLAG_NO_SEEK) == 
0) {
+       if (stream->ops->seek && (stream->flags & PHP_STREAM_FLAG_NO_SEEK) == 0 
&& stream->readpos != stream->writepos) {
                stream->readpos = stream->writepos = 0;
 
                stream->ops->seek(stream, stream->position, SEEK_SET, 
&stream->position TSRMLS_CC);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to