[webkit-dev] files with .mm extension

Mark Rowe mrowe at apple.com
Thu Apr 30 21:21:19 PDT 2009


On 2009-04-30, at 21:17, Meryl Silverburgh wrote:

> Hi,
>
> Can you please tell me what are the files with .mm extension?
> e.g. platform/graphics/mac/ImageMac.mm?
>
> It looks like c++, but it has syntax like this:
>
>  NSBundle *bundle = [NSBundle bundleForClass:[WebCoreBundleFinder  
> class]];
>    NSString *imagePath = [bundle pathForResource:[NSString
> stringWithUTF8String:name] ofType:@"tiff"];
>    NSData *namedImageData = [NSData dataWithContentsOfFile:imagePath];
>
>
> So I am not sure how to read those lines.

The .mm extension indicates Objective-C++, a hybrid of Objective-C and  
C++.  The portion of code that you quoted is Objective-C.  See <http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html 
 > for more information about Objective-C.

- Mark

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3166 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090430/55f2cb38/attachment.bin>


More information about the webkit-dev mailing list