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:

Mon, 11 Dec 2006 19:01

Comments: 1

Reader Comments

Wed Dec 13 08:27:27 2006, by Kiki:

Thanks for the patches :) I've been holding the icu ports from upgrades since a few months, but with your patches it's working again.

Add a Comment

  • Only the name field is mandatory. It's hard to keep track of a conversations where everyone is Anonymous.
  • If you choose to leave an email address, it will not be shown on the page.
  • A limited subset of HTML is allowed in your comment.

Name

Email

URL


Comment: (Limited HTML allowed.)