mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
([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:
parent
100d527e43
commit
67409d675d
1 changed files with 6 additions and 5 deletions
|
@ -206,7 +206,7 @@ my_object_is_class(id object)
|
|||
}
|
||||
|
||||
/* This is the designated sub-initializer for all "reading" coders. */
|
||||
+ coderReadingFromStream: (id <Streaming>) stream
|
||||
+ newReadingFromStream: (id <Streaming>) stream
|
||||
{
|
||||
id cs = [CStream cStreamReadingFromStream: stream];
|
||||
char name[128]; /* Max classname length. */
|
||||
|
@ -221,7 +221,7 @@ my_object_is_class(id object)
|
|||
_initWithCStream: cs
|
||||
formatVersion: version
|
||||
isDecoding: YES];
|
||||
return [new_coder autorelease];
|
||||
return new_coder;
|
||||
}
|
||||
|
||||
/* ..Writing... methods */
|
||||
|
@ -306,9 +306,9 @@ my_object_is_class(id object)
|
|||
|
||||
/* ..Reading... methods */
|
||||
|
||||
+ coderReadingFromFile: (id <String>) filename
|
||||
+ newReadingFromFile: (id <String>) filename
|
||||
{
|
||||
return [self coderReadingFromStream:
|
||||
return [self newReadingFromStream:
|
||||
[StdioStream streamWithFilename: filename
|
||||
fmode: "r"]];
|
||||
}
|
||||
|
@ -317,8 +317,9 @@ my_object_is_class(id object)
|
|||
fromStream: (id <Streaming>)stream;
|
||||
{
|
||||
id c, o;
|
||||
c = [self coderReadingFromStream:stream];
|
||||
c = [self newReadingFromStream:stream];
|
||||
[c decodeObjectAt: &o withName: name];
|
||||
[c release];
|
||||
return [o autorelease];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue