mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
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:
parent
26ee1a0254
commit
244f5a7f23
2 changed files with 15 additions and 34 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue