Summary: | SVG and HTML editing have conflicting inline isWhitespace functions | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Darin Adler <darin> | ||||
Component: | SVG | Assignee: | Darin Adler <darin> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | krit, webkit.review.bot, zimmermann | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Darin Adler
2011-07-25 15:55:32 PDT
Thats correct. Do you want to rename one of the functions? What is the problem? As long as you do not include SVGParserUtills.h into headers it should work. (In reply to comment #1) > Thats correct. Do you want to rename one of the functions? Yes. > What is the problem? As long as you do not include SVGParserUtills.h into headers it should work. There are two problems: 1) It's not good for us two have two different functions with the same name that do similar but different things. Even if these functions were guaranteed never to conflict, it's a recipe for confusion. 1) Even though this currently works, it is not guaranteed to work. These functions are marked inline, but do not have internal linkage. The C++ standard does not allow two different functions with the same name with external linkage and different definitions. One thing that keeps this from being a practical problem right now is that the SVG function takes a const UChar& instead of a UChar so the functions are distinct. But that's actually a mistake. It's not good to have the function take a const UChar&. I have a patch that fixes it by renaming the SVG parser utilities functions. I think you’ll probably like that patch. Created attachment 104273 [details]
Patch
Comment on attachment 104273 [details]
Patch
Looks reasonable, r=me.
Comment on attachment 104273 [details] Patch Clearing flags on attachment: 104273 Committed r93300: <http://trac.webkit.org/changeset/93300> All reviewed patches have been landed. Closing bug. |