Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51580 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59980 invoked from network); 6 Mar 2011 23:46:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Mar 2011 23:46:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.163 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.163 smtp163.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.163] ([67.192.241.163:34002] helo=smtp163.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A5/E0-49829-8EC147D4 for ; Sun, 06 Mar 2011 18:46:49 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp16.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 5625040095; Sun, 6 Mar 2011 18:46:46 -0500 (EST) X-Virus-Scanned: OK Received: by smtp16.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id CFC99400C4; Sun, 6 Mar 2011 18:46:45 -0500 (EST) Message-ID: <4D741CE4.7080508@sugarcrm.com> Date: Sun, 06 Mar 2011 15:46:44 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.14) Gecko/20110221 Thunderbird/3.1.8 MIME-Version: 1.0 To: Gustavo Lopes CC: "internals@lists.php.net" References: <4D703FBC.3080006@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] streams problem in 5.3 From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Can you tell what exactly you're doing? Why is there any cast in the first > place? > > As far as I can see, the include should eventually call > php_stream_open_for_zend_ex, which should give a ZEND_HANDLE_STREAM file > handle that defers reading to _php_stream_read and fsize to > php_zend_stream_fsizer, with no casting involved. That's a regular include for file, however that one is actually a custom stream handler. I'm not sure yet what led for it to be converted to ZEND_HANDLE_FP, but if we're providing means to do that in the API, it sounds logical that the API shouldn't then require ZEND_HANDLE_FP to be pure file. I.e., if we already saying we're creating non-file FILE* in our code, then our code should be able to process it, shouldn't it? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227