RESOLVED FIXED 56381
Objective-C classes should be typedef-ed as structs (not void*) in C++
https://bugs.webkit.org/show_bug.cgi?id=56381
Summary Objective-C classes should be typedef-ed as structs (not void*) in C++
David Kilzer (:ddkilzer)
Reported Tuesday, March 15, 2011 5:27:52 PM UTC
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(-)
Attachments
Patch (3.76 KB, patch)
2011-03-15 09:27 PDT, David Kilzer (:ddkilzer)
simon.fraser: review+
David Kilzer (:ddkilzer)
Comment 1 Tuesday, March 15, 2011 7:24:49 PM UTC
David Kilzer (:ddkilzer)
Comment 2 Tuesday, March 15, 2011 10:35:30 PM UTC
(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.
David Kilzer (:ddkilzer)
Comment 3 Tuesday, March 15, 2011 10:38:13 PM UTC
(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>
David Kilzer (:ddkilzer)
Comment 4 Wednesday, March 16, 2011 4:01:59 PM UTC
(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>
Note You need to log in before you can comment on or make changes to this bug.