Build fixes for 64-bit.
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Oct 2006 20:50:14 +0000 (20:50 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Oct 2006 20:50:14 +0000 (20:50 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17259 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/loader/mac/LoaderNSURLExtras.m
WebCore/loader/mac/WebFormDataStream.m

index 9cf939de6a1965968c41f3eb7881d12be65b8741..1ad6db2e75c1f28ec821ae3682a83fc84793839c 100644 (file)
@@ -119,7 +119,7 @@ NSURL *urlWithDataRelativeToURL(NSData *data, NSURL *baseURL)
         return nil;
     
     NSURL *result = nil;
-    int length = [data length];
+    size_t length = [data length];
     if (length > 0) {
         // work around <rdar://4470771>: CFURLCreateAbsoluteURLWithBytes(.., TRUE) doesn't remove non-path components.
         baseURL = urlByRemovingResourceSpecifier(baseURL);
@@ -161,14 +161,9 @@ BOOL urlIsEmpty(NSURL *url)
 {
     if (!url)
         return false;
-
-    int length = 0;
     if (!CFURLGetBaseURL((CFURLRef)url))
-        length = CFURLGetBytes((CFURLRef)url, NULL, 0);
-    else
-        length = [urlOriginalData(url) length];
-
-    return length == 0;
+        return CFURLGetBytes((CFURLRef)url, NULL, 0) == 0;
+    return [urlOriginalData(url) length] == 0;
 }
 
 NSURL *canonicalURL(NSURL *url)
index 79f61cb4237a506e1bafbd9e2fe6d1aca96e89cc..ed292656f8b8784c452920f027cd16353689e4ce 100644 (file)
@@ -292,7 +292,7 @@ static void formEventCallback(CFReadStreamRef stream, CFStreamEventType type, vo
 
 void webSetHTTPBody(NSMutableURLRequest *request, NSArray *formData)
 {
-    unsigned count = [formData count];
+    size_t count = [formData count];
 
     // Handle the common special case of one piece of form data, with no files.
     if (count == 1) {