Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15329 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94279 invoked by uid 1010); 9 Mar 2005 16:22:48 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 94264 invoked from network); 9 Mar 2005 16:22:48 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 9 Mar 2005 16:22:48 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:49538] helo=mail.zend.com) by pb1.pair.com (ecelerity HEAD r(5124)) with SMTP id 99/0E-53294-7D22F224 for ; Wed, 09 Mar 2005 11:22:48 -0500 Received: (qmail 21409 invoked from network); 9 Mar 2005 16:22:45 -0000 Received: from shire.zend.office (10.1.2.160) by internal.zend.office with SMTP; 9 Mar 2005 16:22:45 -0000 Date: Wed, 9 Mar 2005 18:22:45 +0200 (IST) X-X-Sender: frodo@shire.zend.office To: Wez Furlong cc: PHP Development In-Reply-To: <4e89b42605030908146b8d99f3@mail.gmail.com> Message-ID: References: <4e89b4260503090718503f9a5@mail.gmail.com> <4e89b42605030907315a85ce74@mail.gmail.com> <4e89b426050309075047ce556c@mail.gmail.com> <4e89b42605030908146b8d99f3@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] zend_stream_fixup From: stas@zend.com (Stanislav Malyshev) WF>>Yes, you missed that a stream can be any stream from PHP land. If it's the PHP stream that's ok for it to be STREAM. PHP streams have own operators for foing things, so if I know STREAM type refers to PHP stream it is completely OK. What I do not understand is why you convert FP to STREAM. Only value from this conversion I can see is that zend_stream_read/zend_stream_getc now call reader instead of doing if and then calling either reader for stream or file-reading function of the engine (which, btw, is private to the engine so you even can not call or set it from outside - meaning it could be as well inlined directly in zend_stream_read/zend_stream_getc - and these seem to be the only functions that use the reader anyway). WF>>Which code in the engine does more than read/close? My code. Since handlers using file_handle (e.g. compile_file handler) is overridable, any code can be in these handlers. And what I want is some sane rules about what can be in file_handle. Limiting file_handle to read/close only doesn't seem reasonable to me, especially that it wasn't so for a long time and only reason so far I see for it is saving two ifs - and underlying file protocols (either fd or FILE * or PHP stream) allow much more than just reading and closing. -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115