[cfe-commits] r155155 - /cfe/trunk/docs/ObjectiveCLiterals.html
Patrick Beard
pcbeard at mac.com
Thu Apr 19 13:48:09 PDT 2012
Author: pcbeard
Date: Thu Apr 19 15:48:09 2012
New Revision: 155155
URL: http://llvm.org/viewvc/llvm-project?rev=155155&view=rev
Log:
Added equivalent method calls in examples.
Modified:
cfe/trunk/docs/ObjectiveCLiterals.html
Modified: cfe/trunk/docs/ObjectiveCLiterals.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ObjectiveCLiterals.html?rev=155155&r1=155154&r2=155155&view=diff
==============================================================================
--- cfe/trunk/docs/ObjectiveCLiterals.html (original)
+++ cfe/trunk/docs/ObjectiveCLiterals.html Thu Apr 19 15:48:09 2012
@@ -111,15 +111,15 @@
<pre>
// numbers.
-NSNumber *smallestInt = @(-INT_MAX - 1);
-NSNumber *piOverTwo = @(M_PI / 2);
+NSNumber *smallestInt = @(-INT_MAX - 1); // [NSNumber numberWithInt:(-INT_MAX - 1)]
+NSNumber *piOverTwo = @(M_PI / 2); // [NSNumber numberWithDouble:(M_PI / 2)]
// enumerated types.
typedef enum { Red, Green, Blue } Color;
-NSNumber *favoriteColor = @(Green);
+NSNumber *favoriteColor = @(Green); // [NSNumber numberWithInt:((int)Green)]
// strings.
-NSString *path = @(getenv("PATH"));
+NSString *path = @(getenv("PATH")); // [NSString stringWithUTF8String:(getenv("PATH"))]
NSArray *pathComponents = [path componentsSeparatedByString:@":"];
</pre>
More information about the cfe-commits
mailing list