Explicitly encode/decode enumerated types as 'int' which is what all

the existing archives use (even if it is incorrect as in many cases
the types are actually 'unsigned int')


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31785 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
nicola 2010-12-27 11:57:04 +00:00
parent 74c604cbb0
commit b854f2da8a
12 changed files with 59 additions and 36 deletions

View file

@ -579,7 +579,7 @@
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[aCoder encodeValueOfObjCType: @encode(GSFileWrapperType) at: &_wrapperType];
[aCoder encodeValueOfObjCType: @encode(int) at: &_wrapperType];
// Dont store the file name
[aCoder encodeObject: _preferredFilename];
[aCoder encodeObject: _fileAttributes];
@ -595,7 +595,7 @@
id wrapperData;
NSImage *iconImage;
[aDecoder decodeValueOfObjCType: @encode(GSFileWrapperType) at: &wrapperType];
[aDecoder decodeValueOfObjCType: @encode(int) at: &wrapperType];
// Dont restore the file name
preferredFilename = [aDecoder decodeObject];
fileAttributes = [aDecoder decodeObject];