Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19144 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53782 invoked by uid 1010); 23 Sep 2005 17:54:02 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 53758 invoked from network); 23 Sep 2005 17:54:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Sep 2005 17:54:02 -0000 X-Host-Fingerprint: 69.12.155.130 69-12-155-130.dsl.static.sonic.net Linux 2.4/2.6 Received: from ([69.12.155.130:1471] helo=pigeon.alphaweb.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 32/4D-24510-D5B34334 for ; Fri, 23 Sep 2005 13:29:01 -0400 Received: from localhost ([127.0.0.1] helo=peiscg33m) by pigeon.alphaweb.net with smtp (Exim 4.10) id 1EIqfo-00009T-00; Fri, 23 Sep 2005 09:45:20 -0700 Message-ID: <003501c5c064$4782bc60$5c8be5a9@ohr.berkeley.edu> Reply-To: "Sara Golemon" To: "Michael Wallner" Cc: References: <79.1A.24510.546D2334@pb1.pair.com> <91.71.24510.E9A93334@pb1.pair.com> Date: Fri, 23 Sep 2005 10:28:07 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Subject: Re: [PATCH] imap_savebody() From: pollita@php.net ("Sara Golemon") > > http://dev.iworks.at/PATCHES/imap_savebody.patch.txt > > Thanks a lot for review; the patch has been updated with your suggestions. > Additionally the whole thing is ifdef'd out in ZTS mode as the c-client > gets function is a global variable. I tested the function with a 17M > message saving to a file as well to an already opened stream. > Getting there, but you can make it work for ZTS mode. Just create a proxy for the gets function which is always set, then have the proxy do a TSRMLS_FETCH() and examine an extension global (e.g. IMAPG(gets_mode) or whatever) to determine whether it's in savebody() and should shuttle to your new gets function, or if it's not in savebody() and should dispatch to the "original" method. Come to that, might as well just make IMAPG(real_gets) as a dynamic function.... Not that I've looked at ext/imap enough to know what the role of gets is precisely. -Sara