ICU4C, FreeBSD 5.3, U_REGEX_MISMATCHED_PAREN: A Fix
I've come up with a fix for the U_REGEX_MISMATCHED_PAREN problem in ICU running on FreeBSD 5.3. I removed an entire type, and some casts to that type. I've tested on FreeBSD, Red Hat 9, and Ubuntu Dapper Drake, all passing the included tests with flying colors.
I haven't figured out why yet, but the cast of
doOpenNonCaptureParen to EParseAction at
i18n/regexcmp.cpp:345 was yielding 0. While digging in to
this, I discovered that EParseAction was only used as the
type for the single parameter to
RegexCompile::doParseActions. (It's used in
rbbiscan.cpp, too, but that's unrelated code, with a separate
definition of the enum.) To reduce complexity, I tried passing a
int32_t to doParseActions and
stripping out the casts. That did the trick.
I assume that in 3.8, there will be a more comprehensive solution, but for now, this works.
The patches:
Comments: 1
Wed Dec 13 08:27:27 2006, by Kiki: