gnustep-dev
[Top][All Lists]
Advanced

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

Aw: decoding problem of NSParagraphstyle


From: Fred Kiefer
Subject: Aw: decoding problem of NSParagraphstyle
Date: Fri, 17 May 2013 17:10:07 +0200 (CEST)

This patch looks correct to me. As I will be away for the long weekend, feel free to apply it yourself. You are correct, the archive files created since the last release containing paragraph styles wont be loaded correctly any more. But there isn't much we can be, we really have to get out a bug fix release rather soon to keep the amount of invalid files small.
 
Fred
 
Gesendet: Freitag, 17. Mai 2013 um 15:24 Uhr
Von: "Sebastian Reitenbach" <address@hidden>
An: address@hidden, "Fred Kiefer" <address@hidden>
Betreff: decoding problem of NSParagraphstyle
Hi,

I found that Grr is unable to open its Gorm files on amd64. First I thought that resaving the gorm files might help, but that didn't worked out.

After a closer look I found that the patch below helps.
The patch is against latest release, but I also haven't seen any changes in trunk against NSParagraphStyle.m since
then.
I guess the patch might break gorm files which are created since SVN rev r36154, where it seems, Fred changed
the coding/encoding for that.

Sebastian

$OpenBSD$
--- Source/NSParagraphStyle.m.orig Sun Mar 17 20:53:50 2013
+++ Source/NSParagraphStyle.m Fri May 17 14:13:52 2013
@@ -236,7 +236,7 @@ static NSParagraphStyle *defaultStyle = nil;
{
/* Set the class version to 2, as the writing direction is now
stored in the encoding */
- [self setVersion: 2];
+ [self setVersion: 3];
}
}

@@ -494,9 +494,18 @@ static NSParagraphStyle *defaultStyle = nil;
[aCoder decodeArrayOfObjCType: @encode(float)
count: count
at: locations];
- [aCoder decodeArrayOfObjCType: @encode(NSInteger)
+ if ([aCoder versionForClassName: @"NSParagraphStyle"] >= 3)
+ {
+ [aCoder decodeArrayOfObjCType: @encode(NSInteger)
count: count
at: types];
+ }
+ else
+ {
+ [aCoder decodeArrayOfObjCType: @encode(int)
+ count: count
+ at: types];
+ }
for (i = 0; i < count; i++)
{
NSTextTab *tab;


_______________________________________________
Gnustep-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/gnustep-dev

reply via email to

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