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 Pero 2010-12-27 11:57:04 +00:00
parent cc3ce8896e
commit f80e259048
12 changed files with 59 additions and 36 deletions

View file

@ -696,7 +696,7 @@ static const char *eventTypes[] = {
- (void) encodeWithCoder: (NSCoder*)aCoder
{
[aCoder encodeValueOfObjCType: @encode(NSEventType) at: &event_type];
[aCoder encodeValueOfObjCType: @encode(int) at: &event_type];
[aCoder encodePoint: location_point];
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &modifier_flags];
[aCoder encodeValueOfObjCType: @encode(NSTimeInterval) at: &event_time];
@ -779,7 +779,7 @@ static const char *eventTypes[] = {
{
int version = [aDecoder versionForClassName: @"NSEvent"];
[aDecoder decodeValueOfObjCType: @encode(NSEventType) at: &event_type];
[aDecoder decodeValueOfObjCType: @encode(int) at: &event_type];
location_point = [aDecoder decodePoint];
[aDecoder decodeValueOfObjCType: @encode(unsigned) at: &modifier_flags];
[aDecoder decodeValueOfObjCType: @encode(NSTimeInterval) at: &event_time];