Corrected bug in last optimization for the parsing of property

list. Now the bitmap representation is retained not the
characterset itself. This did cause undeterministic problems when
reading in the Info.plist.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9734 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
FredKiefer 2001-04-28 13:57:23 +00:00
parent a70dd0619f
commit bb418965ae

View file

@ -119,11 +119,12 @@ static void setupHexdigits()
if (hexdigitsBitmapRep == NULL)
{
NSCharacterSet *hexdigits;
NSData *bitmap;
hexdigits = [NSCharacterSet characterSetWithCharactersInString:
@"0123456789abcdefABCDEF"];
IF_NO_GC(RETAIN(hexdigits));
hexdigitsBitmapRep = [[hexdigits bitmapRepresentation] bytes];
bitmap = RETAIN([hexdigits bitmapRepresentation]);
hexdigitsBitmapRep = [bitmap bytes];
}
}
@ -136,6 +137,7 @@ static void setupQuotables()
if (quotablesBitmapRep == NULL)
{
NSMutableCharacterSet *s;
NSData *bitmap;
s = [[NSCharacterSet characterSetWithCharactersInString:
@"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz$./_"]
@ -143,7 +145,8 @@ static void setupQuotables()
[s invert];
quotables = [s copy];
RELEASE(s);
quotablesBitmapRep = [[quotables bitmapRepresentation] bytes];
bitmap = RETAIN([quotables bitmapRepresentation]);
quotablesBitmapRep = [bitmap bytes];
}
}
@ -155,11 +158,16 @@ static void setupWhitespace()
if (whitespaceBitmapRep == NULL)
{
NSCharacterSet *whitespace;
NSData *bitmap;
/*
whitespace = [NSCharacterSet characterSetWithCharactersInString:
@" \t\r\n\f\b"];
IF_NO_GC(RETAIN(whitespace));
whitespaceBitmapRep = [[whitespace bitmapRepresentation] bytes];
*/
whitespace = [NSCharacterSet whitespaceAndNewlineCharacterSet];
bitmap = RETAIN([whitespace bitmapRepresentation]);
whitespaceBitmapRep = [bitmap bytes];
}
}