[webkit-reviews] review requested: [Bug 56381] Objective-C classes should be typedef-ed as structs (not void*) in C++ : [Attachment 85816] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 15 09:27:52 PDT 2011


David Kilzer (ddkilzer) <ddkilzer at webkit.org> has asked  for review:
Bug 56381: Objective-C classes should be typedef-ed as structs (not void*) in
C++
https://bugs.webkit.org/show_bug.cgi?id=56381

Attachment 85816: Patch
https://bugs.webkit.org/attachment.cgi?id=85816&action=review

------- Additional Comments from David Kilzer (ddkilzer) <ddkilzer at webkit.org>
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(-)


More information about the webkit-reviews mailing list