Bug 56462 - Implement OBJC_CLASS macro in WebCore/config.h
Summary: Implement OBJC_CLASS macro in WebCore/config.h
Status: RESOLVED DUPLICATE of bug 76485
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.6
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-16 08:12 PDT by David Kilzer (:ddkilzer)
Modified: 2012-01-17 21:57 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2011-03-16 08:12:16 PDT
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.
Comment 1 Anders Carlsson 2011-03-16 09:50:43 PDT
Maybe we could even put it in wtf/Platform.h ?
Comment 2 David Kilzer (:ddkilzer) 2011-03-17 08:38:20 PDT
(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.
Comment 3 Sam Weinig 2012-01-17 21:57:53 PST

*** This bug has been marked as a duplicate of bug 76485 ***