@@ -17,13 +17,14 @@ #include "config.h" #import "OFHTTPRequestFailedException.h" #import "OFString.h" #import "OFHTTPRequest.h" -#import "OFAutoreleasePool.h" #import "OFNotImplementedException.h" + +#import "autorelease.h" @implementation OFHTTPRequestFailedException + exceptionWithClass: (Class)class_ HTTPRequest: (OFHTTPRequest*)request result: (OFHTTPRequestResult*)result @@ -61,11 +62,11 @@ [super dealloc]; } - (OFString*)description { - OFAutoreleasePool *pool; + void *pool; const char *type = "(unknown)"; if (description != nil) return description; @@ -79,17 +80,17 @@ case OF_HTTP_REQUEST_TYPE_POST: type = "POST"; break; } - pool = [[OFAutoreleasePool alloc] init]; + pool = objc_autoreleasePoolPush(); description = [[OFString alloc] initWithFormat: @"A HTTP %s request in class %@ with URL %@ failed with code %d", type, inClass, [HTTPRequest URL], [result statusCode]]; - [pool release]; + objc_autoreleasePoolPop(pool); return description; } - (OFHTTPRequest*)HTTPRequest