mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-11 16:50:42 +00:00
(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:
parent
c7c08a83b8
commit
8e808d3bcc
1 changed files with 3 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue