discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Difference between GCC 2.95 and GCC3.1


From: Richard Frith-Macdonald
Subject: Re: Difference between GCC 2.95 and GCC3.1
Date: Sun, 23 Jun 2002 18:33:05 +0100

On Sunday, June 23, 2002, at 05:52 PM, Ravindra wrote:

While moving from GCC 2.95 to GCC 3.1, we observed a problem when special characters(like - or :) were part of the Value in a dictionary.
 
In GCC 2.95 the following program prints {EX = "-16";}, where as in GCC3.1 prints it as {EX = -16;} Because of the missing of double quotes in GCC3.1, unarchiving the archived objects at client side is failing.
 
 
*************************************************************************
*****************
 
#import <Foundation/Foundation.h>
int main (int argc, const char *argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    NSMutableDictionary *thePlist = [NSMutableDictionary dictionary];
    [thePlist setObject:@"-16" forKey:@"EX"];
    NSLog(@"The Plist is %@",thePlist);
    [pool release];
    exit(0); // insure the process exit status is 0
}
 
*************************************************************************
*******************
 
 
We observed that setQuotables in NSString.m was changed from
 
 s = [[NSCharacterSet characterSetWithCharactersInString:           @"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz$./_"] mutableCopy];   -- in GCC 2.95
 
to        s = [[NSCharacterSet characterSetWithCharactersInString:@"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"  @"abcdefghijklmnopqrstuvwxyz!#$%&*+-./:?@|~_^"] mutableCopy];  -- in GCC 3.1
 
If there is any specific reason behind this change, please let us know.

1. This has nothing to do with gcc versions - it's GNUstep versions.

2. The change is a bugfix ... the old version was incorrect, quoting character which
should not be quoted.

The solution is to upgrade the code which is reading the property-list to the fixed version.




reply via email to

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