discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gorm loading problems


From: Ivan Vučica
Subject: Re: Gorm loading problems
Date: Thu, 21 Feb 2013 18:02:32 +0100

Don't enums change size between compilers, archs, and number of items in them? 
I think I read something about this being addressed in the next C standard.

Probably explains why Apple uses anonymous enums for constants and typedefs the 
type names to NSInteger et al.

Regards,

Ivan Vučica
via phone

On 21. 2. 2013., at 17:53, Riccardo Mottola <riccardo.mottola@libero.it> wrote:

> Hi,
> 
> Fred Kiefer wrote:
>> 
>> To me it looks like an enumerator :-)
>> Or at least it used to be one that got redefinied. Just replace it with 
>> NSInteger in the @encode and see if that works.
> 
> I applied the patch below and the GORM file loads again fine. Should this go 
> in that way? Or is the NSLineBreakMode correct and this should be only used 
> for compatibility or for letting me open & save the gorm file? I'm confused.
> 
> Riccardo
> 
> Index: Source/NSParagraphStyle.m
> ===================================================================
> --- Source/NSParagraphStyle.m   (revision 36181)
> +++ Source/NSParagraphStyle.m   (working copy)
> @@ -471,7 +471,7 @@
>       unsigned count;
> 
>       [aCoder decodeValueOfObjCType: @encode(NSTextAlignment) at: 
> &_alignment];
> -      [aCoder decodeValueOfObjCType: @encode(NSLineBreakMode) at: 
> &_lineBreakMode];
> +      [aCoder decodeValueOfObjCType: @encode(NSInteger) at: &_lineBreakMode];
>       [aCoder decodeValueOfObjCType: @encode(float) at: 
> &_firstLineHeadIndent];
>       [aCoder decodeValueOfObjCType: @encode(float) at: &_headIndent];
>       [aCoder decodeValueOfObjCType: @encode(float) at: &_lineSpacing];
> 
> 
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep



reply via email to

[Prev in Thread] Current Thread [Next in Thread]