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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to