Updated encoding/decoding of enums to work across compiled versions

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep@31789 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2010-12-27 14:20:41 +00:00
parent 80775a8c87
commit c6eb6061ae
2 changed files with 8 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2010-12-27 Nicola Pero <nicola.pero@meta-innovation.com>
* NSAttributeDescription.m ([-initWithCoder:],
[-encodeWithCoder:]): Explicitly encode and decode NSAttributeType
as 'int' to work across compiler versions.
2007-12-13 Nikolaus Schaller <hns@computer.org>
* made compile on MacOS X and mySTEP

View file

@ -85,8 +85,7 @@
}
else
{
[coder decodeValueOfObjCType: @encode(NSAttributeType)
at: &_attributeType];
[coder decodeValueOfObjCType: @encode(int) at: &_attributeType];
// ASSIGN(_attributeValueClassName, [coder decodeObject]);
ASSIGN(_defaultValue, [coder decodeObject]);
}
@ -108,8 +107,7 @@
}
else
{
[coder encodeValueOfObjCType: @encode(NSAttributeType)
at: &_attributeType];
[coder encodeValueOfObjCType: @encode(int) at: &_attributeType];
// [coder encodeObject: _attributeValueClassName];
[coder encodeObject: _defaultValue];
}