From 8e808d3bcc4721838f50f45168c65d13ceac75f6 Mon Sep 17 00:00:00 2001 From: Andrew McCallum Date: Thu, 20 Apr 1995 16:04:56 +0000 Subject: [PATCH] (dataWithBytesNoCopy:length:): Send alloc to NSGData class, not self. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@401 72102866-910b-0410-8b05-ffd578937521 --- Source/NSData.m | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Source/NSData.m b/Source/NSData.m index e14f15848..b742c10de 100644 --- a/Source/NSData.m +++ b/Source/NSData.m @@ -48,10 +48,7 @@ + (id) dataWithBytesNoCopy: (void*)bytes length: (unsigned int)length { - /* FIXME: Why do we switch to `self' here, when `NSGData' was used - * above and still seems more applicable? If we just use `self' we - * don't get useful objects. */ - return [[[self alloc] initWithBytesNoCopy:bytes length:length] + return [[[NSGData alloc] initWithBytesNoCopy:bytes length:length] autorelease]; } @@ -60,7 +57,8 @@ * though. */ + (id)dataWithContentsOfFile: (NSString*)path { - return [[[NSGData alloc] initWithContentsOfFile:path] autorelease]; + return [[[NSGData alloc] initWithContentsOfFile:path] + autorelease]; } + (id) dataWithContentsOfMappedFile: (NSString*)path