(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
This commit is contained in:
Andrew McCallum 1995-04-20 16:04:56 +00:00
parent c7c08a83b8
commit 8e808d3bcc

View file

@ -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