Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43836 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19394 invoked from network); 4 May 2009 19:00:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 May 2009 19:00:50 -0000 Authentication-Results: pb1.pair.com header.from=php_lists@realplain.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php_lists@realplain.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain realplain.com from 209.151.69.1 cause and error) X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 209.151.69.1 liberty.vosn.net Linux 2.4/2.6 Received: from [209.151.69.1] ([209.151.69.1:38362] helo=liberty.vosn.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/5B-57065-16B3FF94 for ; Mon, 04 May 2009 15:00:50 -0400 Received: from 75-121-89-64.dyn.centurytel.net ([75.121.89.64]:49244 helo=pc1) by liberty.vosn.net with smtp (Exim 4.69) (envelope-from ) id 1M13PC-0003yN-1q; Mon, 04 May 2009 13:00:46 -0600 Message-ID: <6886527DD6D44DFAAC29221BAE374B07@pc1> To: , Cc: "Nuno Lopes" , "Lukas Kahwe Smith" , "Dmitry Stogov" References: <6604D94D40FD465F992144110B075BB5@pc1> <9D5D4CBF-5CB1-47EC-81F4-59E3C48EEEEF@pooteeweet.org> <49FE9AE7.4000008@php.net> Date: Mon, 4 May 2009 14:00:43 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - liberty.vosn.net X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - realplain.com Subject: Re: [PHP-DEV] [PATCH] Scanner "diet" with fixes, etc. From: php_lists@realplain.com ("Matt Wilmas") Hi Brian, ----- Original Message ----- From: "shire" Sent: Monday, May 04, 2009 > > Hey Matt, > > Thanks for posting, sorry for not having a chance to reply to this sooner. > Maybe couple things from the patch, > >>> +/* To save initial string length after scanning to first variable, >>> CG(doc_comment_len) can be reused */ >>> +#define double_quotes_scanned_len CG(doc_comment_len) >>> + > > (minor) Maybe we should rename this var if we're going to use it for other > purposes, this doesn't really save any typing. Also if we do want the > define maybe we should upper case it so it's more obvious? Yeah, I tried to think of other ways to do it, but just left it trying to look like another variable (not to save typing). Well, it can easily be changed later if a "cleaner" way is decided... >>> + while (YYCURSOR < YYLIMIT) { >>> + switch (*YYCURSOR++) { > > In the example above, which we have a couple examples of here, we don't > obey the YYFILL macro to detect if we have exceeded our EOF. This > *might* be a problem, but only really depends on if we intend to use the > YYFILL as a solution for exceeding our mmap bounds. I don't understand what the problem might be? The YYCURSOR < YYLIMIT check is what the YYFILL has been doing. If you mean after changes later, as long as the the whole thing is mmap()'d (which I'm assuming would be the case?), it just "looks" like a standard string, with terminating '\0', right? And there's no reading past YYLIMIT. > [...] > -shire - Matt