Bug 56381 - Objective-C classes should be typedef-ed as structs (not void*) in C++
Summary: Objective-C classes should be typedef-ed as structs (not void*) in C++
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-15 09:27 PDT by David Kilzer (:ddkilzer)
Modified: 2011-03-16 08:01 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.76 KB, patch)
2011-03-15 09:27 PDT, David Kilzer (:ddkilzer)
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2011-03-15 09:27:52 PDT
Created attachment 85816 [details]
Patch

Reviewed by NOBODY (OOPS!).

Typedef-ing Objective-C classes as void* for pure C++ makes it
easier for bugs to creep in because compilers can't do any type
checking for void pointers.

* platform/graphics/GraphicsContext3D.h: Changed typedef
declarations for CALayer and WebGLLayer from void* to structs.
(WebCore::GraphicsContext3D::platformLayer): Changed
static_cast<CALayer*> to reinterpret_cast<CALayer*> now that
CALayer and WebGLLayer are not void pointers.
* platform/graphics/GraphicsLayer.h: Changed typedef declaration
for PlatformLayer from void* to struct CALayer.
* platform/graphics/ca/PlatformCAAnimation.h: Changed typedef
declaration for CAPropertyAnimation from void* to a struct.
Extracted typdef for PlatformAnimationRef.
---
 4 files changed, 27 insertions(+), 7 deletions(-)
Comment 1 David Kilzer (:ddkilzer) 2011-03-15 11:24:49 PDT
Committed r81156: <http://trac.webkit.org/changeset/81156>
Comment 2 David Kilzer (:ddkilzer) 2011-03-15 14:35:30 PDT
(In reply to comment #1)
> Committed r81156: <http://trac.webkit.org/changeset/81156>

This broke building WebKit with clang.  Anders is working on a fix.
Comment 3 David Kilzer (:ddkilzer) 2011-03-15 14:38:13 PDT
(In reply to comment #2)
> (In reply to comment #1)
> > Committed r81156: <http://trac.webkit.org/changeset/81156>
> 
> This broke building WebKit with clang.  Anders is working on a fix.

Fixed in r81172.  <http://trac.webkit.org/changeset/81172>
Comment 4 David Kilzer (:ddkilzer) 2011-03-16 08:01:59 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > Committed r81156: <http://trac.webkit.org/changeset/81156>
> > 
> > This broke building WebKit with clang.  Anders is working on a fix.
> 
> Fixed in r81172.  <http://trac.webkit.org/changeset/81172>

Clean-up in r81242.  <http://trac.webkit.org/changeset/81242>