[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [PATCH] lstrlib and match() \0 in pattern strings
- From: Rene Rebe <rene@...>
- Date: Sat, 10 Apr 2010 16:39:15 +0200
On Apr 10, 2010, at 4:02 PM, Roberto Ierusalimschy wrote:
>> what do yo think about incorporating something like my proposed patch
>> to make a future lua version (like 5.2) string lib pattern matching
>> embedded 0 aware?
>
> Lua 5.2 will accept embedded \0s in patterns.
>
> Two details about your patch:
>
> - It seems simpler to keep the pattern end address in structure
> MatchState, instead of adding it as an extra parameter to several
> functions.
>
> - I think you forgot to change matchbalance. (My bad: its code uses
> 0 instead of '\0'...)
Sounds good. My patch was just the result of a quick-pass and test-run. Thanks you for the great news and review!
René
--
René Rebe, ExactCODE GmbH, Jaegerstr. 67, DE-10117 Berlin
http://exactcode.com | http://t2-project.org | http://rene.rebe.de