add support to encode/decode larger arrays

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34823 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2012-02-27 10:29:10 +00:00
parent 0c7763f7e1
commit b7a7b40179
4 changed files with 27 additions and 20 deletions

View file

@ -1870,7 +1870,7 @@ failure:
- (void) encodeWithCoder: (NSCoder*)aCoder
{
NSUInteger length = [self length];
unsigned length = [self length];
void *bytes = [self mutableBytes];
if ([aCoder allowsKeyedCoding])
@ -1881,7 +1881,7 @@ failure:
}
else
{
[aCoder encodeValueOfObjCType: @encode(NSUInteger)
[aCoder encodeValueOfObjCType: @encode(unsigned)
at: &length];
if (length)
{
@ -1917,9 +1917,9 @@ failure:
}
else
{
NSUInteger l;
unsigned l;
[aCoder decodeValueOfObjCType: @encode(NSUInteger) at: &l];
[aCoder decodeValueOfObjCType: @encode(unsigned) at: &l];
if (l)
{
void *b;