commit 7ac1bf11f8e6267e6146230f2dce93765542bf05
Author: Miltiadis Vasilakis <mvasilak@gmail.com>
Date:   Fri Mar 16 17:21:34 2012 +0200

    Fix problem with precision in numerical values read from headers and xml.

diff --git a/asi-http-request-with-pithos/Classes/Pithos/ASIPithosAccount.m b/asi-http-request-with-pithos/Classes/Pithos/ASIPithosAccount.m
index 8e93a02..3aa3756 100644
--- a/asi-http-request-with-pithos/Classes/Pithos/ASIPithosAccount.m
+++ b/asi-http-request-with-pithos/Classes/Pithos/ASIPithosAccount.m
@@ -46,7 +46,7 @@
 
 - (NSString *)description {
     return [NSString stringWithFormat:@"name: %@, containerCount: %lu, bytesUsed: %lu, untilTimestamp: %@, groups: %@, policy: %@, metadata: %@, lastModified: %@", 
-            name, containerCount, bytesUsed, untilTimestamp, groups, metadata, policy, lastModified];
+            name, containerCount, bytesUsed, untilTimestamp, groups, policy, metadata, lastModified];
 }
 
 - (void) dealloc {
diff --git a/asi-http-request-with-pithos/Classes/Pithos/ASIPithosAccountRequest.m b/asi-http-request-with-pithos/Classes/Pithos/ASIPithosAccountRequest.m
index 5bbd3bb..c63f6e5 100644
--- a/asi-http-request-with-pithos/Classes/Pithos/ASIPithosAccountRequest.m
+++ b/asi-http-request-with-pithos/Classes/Pithos/ASIPithosAccountRequest.m
@@ -104,11 +104,11 @@
 }
 
 - (NSUInteger)containerCount {
-	return [[[self responseHeaders] objectForKey:@"X-Account-Container-Count"] intValue];
+	return [[[self responseHeaders] objectForKey:@"X-Account-Container-Count"] integerValue];
 }
 
 - (NSUInteger)bytesUsed {
-	return [[[self responseHeaders] objectForKey:@"X-Account-Bytes-Used"] intValue];
+	return [[[self responseHeaders] objectForKey:@"X-Account-Bytes-Used"] integerValue];
 }
 
 - (NSDate *)untilTimestamp {
@@ -283,9 +283,9 @@
 	if ([elementName isEqualToString:@"name"]) {
         currentContainer.name = currentContent;
 	} else if ([elementName isEqualToString:@"count"]) {
-        currentContainer.count = [currentContent intValue];
+        currentContainer.count = [currentContent integerValue];
 	} else if ([elementName isEqualToString:@"bytes"]) {
-        currentContainer.bytes = [currentContent intValue];
+        currentContainer.bytes = [currentContent integerValue];
     } else if ([elementName isEqualToString:@"last_modified"]) {
         currentContainer.lastModified = [[self dateFormatterWithFormatId:0] dateFromString:
                                          [currentContent stringByReplacingOccurrencesOfString:@":" 
diff --git a/asi-http-request-with-pithos/Classes/Pithos/ASIPithosContainerRequest.m b/asi-http-request-with-pithos/Classes/Pithos/ASIPithosContainerRequest.m
index da37225..443f784 100644
--- a/asi-http-request-with-pithos/Classes/Pithos/ASIPithosContainerRequest.m
+++ b/asi-http-request-with-pithos/Classes/Pithos/ASIPithosContainerRequest.m
@@ -114,15 +114,15 @@
 }
 
 - (NSUInteger)objectCount {
-	return [[[self responseHeaders] objectForKey:@"X-Container-Object-Count"] intValue];
+	return [[[self responseHeaders] objectForKey:@"X-Container-Object-Count"] integerValue];
 }
 
 - (NSUInteger)bytesUsed {
-	return [[[self responseHeaders] objectForKey:@"X-Container-Bytes-Used"] intValue];
+	return [[[self responseHeaders] objectForKey:@"X-Container-Bytes-Used"] integerValue];
 }
 
 - (NSUInteger)blockSize {
-	return [[[self responseHeaders] objectForKey:@"X-Container-Block-Size"] intValue];
+	return [[[self responseHeaders] objectForKey:@"X-Container-Block-Size"] integerValue];
 }
 
 - (NSString *)blockHash {
@@ -436,7 +436,7 @@
 	} else if ([elementName isEqualToString:@"x_object_uuid"]) {
         currentObject.UUID = currentContent;
 	} else if ([elementName isEqualToString:@"bytes"]) {
-        currentObject.bytes = [currentContent intValue];
+        currentObject.bytes = [currentContent integerValue];
 	} else if ([elementName isEqualToString:@"content_type"]) {
         currentObject.contentType = currentContent;
     } else if ([elementName isEqualToString:@"last_modified"]) {
diff --git a/asi-http-request-with-pithos/Classes/Pithos/ASIPithosObjectRequest.m b/asi-http-request-with-pithos/Classes/Pithos/ASIPithosObjectRequest.m
index 39e533d..a5b10b7 100644
--- a/asi-http-request-with-pithos/Classes/Pithos/ASIPithosObjectRequest.m
+++ b/asi-http-request-with-pithos/Classes/Pithos/ASIPithosObjectRequest.m
@@ -218,7 +218,7 @@
 - (NSUInteger)objectContentLength {
     NSString *objectContentLengthString = [[self responseHeaders] objectForKey:@"Content-Length"];
     if (objectContentLengthString)
-        return [objectContentLengthString intValue];
+        return [objectContentLengthString integerValue];
     return 0;
 }
 
@@ -1651,9 +1651,9 @@
 - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict {
 	self.currentElement = elementName;
     if ((objectRequestType == ASIPithosObjectRequestHashmap) && [elementName isEqualToString:@"object"]) {
-        blockSize = [[attributeDict valueForKey:@"block_size"] intValue];
+        blockSize = [[attributeDict valueForKey:@"block_size"] integerValue];
         blockHash = [[NSString alloc] initWithString:[attributeDict valueForKey:@"block_hash"]];
-        bytes = [[attributeDict valueForKey:@"bytes"] intValue];
+        bytes = [[attributeDict valueForKey:@"bytes"] integerValue];
     } else if ((objectRequestType == ASIPithosObjectRequestVersions) && [elementName isEqualToString:@"version"]) {
         self.currentObject = [ASIPithosObject object];
         currentObject.versionTimestamp = [NSDate dateWithTimeIntervalSince1970:[[attributeDict valueForKey:@"timestamp"] doubleValue]];
diff --git a/asi-http-request-with-pithos/Classes/Pithos/ASIPithosRequest.m b/asi-http-request-with-pithos/Classes/Pithos/ASIPithosRequest.m
index b9139f2..7c59767 100644
--- a/asi-http-request-with-pithos/Classes/Pithos/ASIPithosRequest.m
+++ b/asi-http-request-with-pithos/Classes/Pithos/ASIPithosRequest.m
@@ -146,7 +146,7 @@
 	if ([elementName isEqualToString:@"name"]) {
         currentAccount.name = currentContent;
 	} else if ([elementName isEqualToString:@"count"]) {
-        currentAccount.containerCount = [currentContent intValue];
+        currentAccount.containerCount = [currentContent integerValue];
     } else if ([elementName isEqualToString:@"last_modified"]) {
         currentAccount.lastModified = [[self dateFormatterWithFormatId:0] dateFromString:
                                        [currentContent stringByReplacingOccurrencesOfString:@":" 
@@ -154,7 +154,7 @@
                                                                                     options:NSBackwardsSearch 
                                                                                       range:NSMakeRange(([currentContent length] - 3), 1)]];
 	} else if ([elementName isEqualToString:@"bytes"]) {
-        currentAccount.bytesUsed = [currentContent intValue];
+        currentAccount.bytesUsed = [currentContent integerValue];
 	} else if ([elementName isEqualToString:@"account"]) {
 		[sharingAccounts addObject:currentAccount];
         self.currentAccount = nil;
