Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15330 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51684 invoked by uid 1010); 9 Mar 2005 16:54:02 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 51616 invoked from network); 9 Mar 2005 16:54:00 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 9 Mar 2005 16:54:00 -0000 X-Host-Fingerprint: 64.233.184.203 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.203:34058] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity HEAD r(5124)) with SMTP id A7/E2-53294-E1A2F224 for ; Wed, 09 Mar 2005 11:53:55 -0500 Received: by wproxy.gmail.com with SMTP id 37so229202wra for ; Wed, 09 Mar 2005 08:53:45 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=LDQdrVW806FIO9CbbzjMcwteUSf+5RLFV8N8MH16C1p5c/FcpgfRZ7ORXMwP66Ru6Gz7UEB0LiMlcdSzkhyvJWksWTi4HcdgSTjTMcYDjp6FMZ6Th+15T2nr+nn0/v+AMMHuoap4S5BeQ9LRUA4orSgJ8/TNBwisLAI/N/ykAK8= Received: by 10.54.34.28 with SMTP id h28mr940103wrh; Wed, 09 Mar 2005 08:53:44 -0800 (PST) Received: by 10.54.44.57 with HTTP; Wed, 9 Mar 2005 08:53:43 -0800 (PST) Message-ID: <4e89b42605030908535214ead0@mail.gmail.com> Date: Wed, 9 Mar 2005 11:53:43 -0500 Reply-To: Wez Furlong To: Stanislav Malyshev Cc: PHP Development In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <4e89b4260503090718503f9a5@mail.gmail.com> <4e89b42605030907315a85ce74@mail.gmail.com> <4e89b426050309075047ce556c@mail.gmail.com> <4e89b42605030908146b8d99f3@mail.gmail.com> Subject: Re: [PHP-DEV] zend_stream_fixup From: kingwez@gmail.com (Wez Furlong) Bitching about code breakage for something that is not in public CVS isn't going to win you any points. This code was added specifically so that include and require will operate correctly on all php streams. Not only that, but it has been there for quite a long time now; you've had plenty of time to raise issues. If you need to call stat from within the engine, it can be added, but you need to be aware that stat will not work in all cases, and the fact that no other place in the engine needed it at the time it was written explains why there is no stat prototype. The purpose of the stream structure is not to save ifs, it's to allow the engine to call into the php streams layer without a hard dependency on PHP, which is something you guys have been touchy about in the past. --Wez. On Wed, 9 Mar 2005 18:22:45 +0200 (IST), Stanislav Malyshev wrote: > 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 >