Bug 56462
| Summary: | Implement OBJC_CLASS macro in WebCore/config.h | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> |
| Component: | WebCore Misc. | Assignee: | David Kilzer (:ddkilzer) <ddkilzer> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | andersca, cmarrin, dino, sam, simon.fraser |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Mac | ||
| OS: | OS X 10.6 | ||
David Kilzer (:ddkilzer)
The WebKit2/config.h header has the following OBJC_CLASS macro defined:
#ifdef __OBJC__
#define OBJC_CLASS @class
#else
#define OBJC_CLASS class
#endif
This makes it possible to declare classes once for both Obj-C[++] and C++ source. It would remove over 20 lines of declarations in Source/WebCore/platform/mac/WebCoreSystemInterface.h and other headers where both types must be declared.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Anders Carlsson
Maybe we could even put it in wtf/Platform.h ?
David Kilzer (:ddkilzer)
(In reply to comment #1)
> Maybe we could even put it in wtf/Platform.h ?
I found that I had to add OBJC_CLASS to WebKitPrefix.h because of its use in all of the WebCore headers, so I think that moving it to Platform.h would cut down on the duplication between projects.
Sam Weinig
*** This bug has been marked as a duplicate of bug 76485 ***