[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [PATCH] lstrlib and match() \0 in pattern strings
- From: Roberto Ierusalimschy <roberto@...>
- Date: Sat, 10 Apr 2010 11:02:08 -0300
> 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'...)
-- Roberto