From 14a4337ace8797b3422a582e166e1fde6efb24a0 Mon Sep 17 00:00:00 2001 From: mccallum Date: Sat, 15 Apr 1995 19:40:19 +0000 Subject: [PATCH] Fixed typos. Implemented -init. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@362 72102866-910b-0410-8b05-ffd578937521 --- Source/NSData.m | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Source/NSData.m b/Source/NSData.m index 4d6fcc9ca..8098a8c0d 100644 --- a/Source/NSData.m +++ b/Source/NSData.m @@ -24,8 +24,9 @@ #include #include #include +#include -@class NSGNUData; /* xxx Needs to be #included. */ +/* xxx Pretty messy. Needs work. */ @implementation NSData @@ -33,7 +34,7 @@ + (id) data { - return [[[NSGNUData alloc] init] + return [[[NSGData alloc] init] autorelease]; } @@ -71,7 +72,7 @@ return [self initWithBytesNoCopy:buf length:length]; } -/* This is one of the designated initializers for NSData */ +/* This is the designated initializer for NSData */ - (id) initWithBytesNoCopy: (void*)bytes length: (unsigned int)length { @@ -81,6 +82,13 @@ return nil; } +- init +{ + /* xxx Is this right? */ + return [self initWithBytesNoCopy:NULL + length:0]; +} + - (id) initWithContentsOfFile: (NSString*)path { return [self notImplemented:_cmd];