Tidied coding.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3097 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1998-10-21 14:02:33 +00:00
parent 26ee1a0254
commit 244f5a7f23
2 changed files with 15 additions and 34 deletions

View file

@ -143,34 +143,23 @@
- (void) encodeWithCoder: aCoder
{
[aCoder encodeValueOfObjCType:@encode(unsigned) at:&_count
withName:@"Concrete String count"];
[aCoder encodeValueOfObjCType:@encode(unsigned) at:&_count];
[aCoder encodeArrayOfObjCType:@encode(unsigned char)
count:_count
at:_contents_chars
withName:@"Concrete String content_chars"];
at:_contents_chars];
}
- initWithCoder: aCoder
{
#if 0
[aCoder decodeValueOfObjCType:@encode(char*) at:&_contents_chars
withName:NULL];
_count = strlen(_contents_chars);
_zone = NSZoneFromPointer(_contents_chars);
#else
[aCoder decodeValueOfObjCType:@encode(unsigned)
at:&_count
withName:NULL];
at:&_count];
if (_count > 0) {
_zone = fastZone(self);
_contents_chars = NSZoneMalloc(_zone, _count);
[aCoder decodeArrayOfObjCType:@encode(unsigned char)
count:_count
at:_contents_chars
withName:NULL];
at:_contents_chars];
}
#endif
return self;
}