([Coder +newReadingFromStream:]): Renamed from

coderReadingFromStream:, because it's silly to have different names
for this method for subclasses of Coder.  Don't autorelease returned
object (I also find this more helpful).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@882 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1996-01-28 02:09:10 +00:00
parent 666be690b4
commit 315b64ea8d

View file

@ -206,7 +206,7 @@ my_object_is_class(id object)
} }
/* This is the designated sub-initializer for all "reading" coders. */ /* This is the designated sub-initializer for all "reading" coders. */
+ coderReadingFromStream: (id <Streaming>) stream + newReadingFromStream: (id <Streaming>) stream
{ {
id cs = [CStream cStreamReadingFromStream: stream]; id cs = [CStream cStreamReadingFromStream: stream];
char name[128]; /* Max classname length. */ char name[128]; /* Max classname length. */
@ -221,7 +221,7 @@ my_object_is_class(id object)
_initWithCStream: cs _initWithCStream: cs
formatVersion: version formatVersion: version
isDecoding: YES]; isDecoding: YES];
return [new_coder autorelease]; return new_coder;
} }
/* ..Writing... methods */ /* ..Writing... methods */
@ -306,9 +306,9 @@ my_object_is_class(id object)
/* ..Reading... methods */ /* ..Reading... methods */
+ coderReadingFromFile: (id <String>) filename + newReadingFromFile: (id <String>) filename
{ {
return [self coderReadingFromStream: return [self newReadingFromStream:
[StdioStream streamWithFilename: filename [StdioStream streamWithFilename: filename
fmode: "r"]]; fmode: "r"]];
} }
@ -317,8 +317,9 @@ my_object_is_class(id object)
fromStream: (id <Streaming>)stream; fromStream: (id <Streaming>)stream;
{ {
id c, o; id c, o;
c = [self coderReadingFromStream:stream]; c = [self newReadingFromStream:stream];
[c decodeObjectAt: &o withName: name]; [c decodeObjectAt: &o withName: name];
[c release];
return [o autorelease]; return [o autorelease];
} }