[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Aw: decoding problem of NSParagraphstyle
From: |
Sebastian Reitenbach |
Subject: |
Re: Aw: decoding problem of NSParagraphstyle |
Date: |
Fri, 17 May 2013 19:17:02 +0200 |
User-agent: |
SOGoMail 2.0.5a |
On Friday, May 17, 2013 17:10 CEST, "Fred Kiefer" <address@hidden> wrote:
>
> 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.
pushed the change to svn. Also added the patch to the -gui port on OpenBSD.
Hope for another bugfix release then. While there, could the gnustep-examples
also get a new release at the same time?
cheers,
Sebastian
>
>
>
> 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
>
>