mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
fix bug #20215
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25272 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
092bd56254
commit
7fc6b260a2
2 changed files with 28 additions and 23 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2007-06-20 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSPredicate.m: Fix bug #20215 ... scanning of greater than
|
||||||
|
and less than operators.
|
||||||
|
|
||||||
2007-06-15 Adam Fedor <fedor@gnu.org>
|
2007-06-15 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
* Source/NSTimeZone.m ([NSTimeZone +timeZoneArray]): Skip .tab
|
* Source/NSTimeZone.m ([NSTimeZone +timeZoneArray]): Skip .tab
|
||||||
|
|
|
@ -1605,41 +1605,41 @@
|
||||||
{
|
{
|
||||||
NSPredicate *l = [self parseNot];
|
NSPredicate *l = [self parseNot];
|
||||||
|
|
||||||
while ([self scanPredicateKeyword: @"OR"] ||
|
while ([self scanPredicateKeyword: @"OR"]
|
||||||
[self scanPredicateKeyword: @"||"])
|
|| [self scanPredicateKeyword: @"||"])
|
||||||
{
|
{
|
||||||
NSPredicate *r = [self parseNot];
|
NSPredicate *r = [self parseNot];
|
||||||
|
|
||||||
if ([r isKindOfClass: [NSCompoundPredicate class]]
|
if ([r isKindOfClass: [NSCompoundPredicate class]]
|
||||||
&& [(NSCompoundPredicate *)r compoundPredicateType]
|
&& [(NSCompoundPredicate *)r compoundPredicateType]
|
||||||
== NSOrPredicateType)
|
== NSOrPredicateType)
|
||||||
{
|
{
|
||||||
// merge
|
// merge
|
||||||
if ([l isKindOfClass: [NSCompoundPredicate class]]
|
if ([l isKindOfClass: [NSCompoundPredicate class]]
|
||||||
&& [(NSCompoundPredicate *)l compoundPredicateType]
|
&& [(NSCompoundPredicate *)l compoundPredicateType]
|
||||||
== NSOrPredicateType)
|
== NSOrPredicateType)
|
||||||
{
|
{
|
||||||
[(NSMutableArray *)[(NSCompoundPredicate *)l subpredicates]
|
[(NSMutableArray *)[(NSCompoundPredicate *)l subpredicates]
|
||||||
addObjectsFromArray: [(NSCompoundPredicate *)r subpredicates]];
|
addObjectsFromArray: [(NSCompoundPredicate *)r subpredicates]];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[(NSMutableArray *)[(NSCompoundPredicate *)r subpredicates]
|
[(NSMutableArray *)[(NSCompoundPredicate *)r subpredicates]
|
||||||
insertObject: l atIndex: 0];
|
insertObject: l atIndex: 0];
|
||||||
l = r;
|
l = r;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ([l isKindOfClass: [NSCompoundPredicate class]]
|
else if ([l isKindOfClass: [NSCompoundPredicate class]]
|
||||||
&& [(NSCompoundPredicate *)l compoundPredicateType]
|
&& [(NSCompoundPredicate *)l compoundPredicateType]
|
||||||
== NSOrPredicateType)
|
== NSOrPredicateType)
|
||||||
{
|
{
|
||||||
[(NSMutableArray *) [(NSCompoundPredicate *) l subpredicates]
|
[(NSMutableArray *) [(NSCompoundPredicate *) l subpredicates]
|
||||||
addObject:r];
|
addObject:r];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
l = [NSCompoundPredicate orPredicateWithSubpredicates:
|
l = [NSCompoundPredicate orPredicateWithSubpredicates:
|
||||||
[NSArray arrayWithObjects: l, r, nil]];
|
[NSArray arrayWithObjects: l, r, nil]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return l;
|
return l;
|
||||||
|
@ -1677,34 +1677,34 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
left = [self parseExpression];
|
left = [self parseExpression];
|
||||||
if ([self scanString: @"<" intoString: NULL])
|
if ([self scanString: @"!=" intoString: NULL]
|
||||||
|
|| [self scanString: @"<>" intoString: NULL])
|
||||||
{
|
{
|
||||||
type = NSLessThanPredicateOperatorType;
|
type = NSNotEqualToPredicateOperatorType;
|
||||||
}
|
}
|
||||||
else if ([self scanString: @"<=" intoString: NULL]
|
else if ([self scanString: @"<=" intoString: NULL]
|
||||||
|| [self scanString: @"=<" intoString: NULL])
|
|| [self scanString: @"=<" intoString: NULL])
|
||||||
{
|
{
|
||||||
type = NSLessThanOrEqualToPredicateOperatorType;
|
type = NSLessThanOrEqualToPredicateOperatorType;
|
||||||
}
|
}
|
||||||
else if ([self scanString: @">" intoString: NULL])
|
|
||||||
{
|
|
||||||
type = NSGreaterThanPredicateOperatorType;
|
|
||||||
}
|
|
||||||
else if ([self scanString: @">=" intoString: NULL]
|
else if ([self scanString: @">=" intoString: NULL]
|
||||||
|| [self scanString: @"=>" intoString: NULL])
|
|| [self scanString: @"=>" intoString: NULL])
|
||||||
{
|
{
|
||||||
type = NSGreaterThanOrEqualToPredicateOperatorType;
|
type = NSGreaterThanOrEqualToPredicateOperatorType;
|
||||||
}
|
}
|
||||||
|
else if ([self scanString: @"<" intoString: NULL])
|
||||||
|
{
|
||||||
|
type = NSLessThanPredicateOperatorType;
|
||||||
|
}
|
||||||
|
else if ([self scanString: @">" intoString: NULL])
|
||||||
|
{
|
||||||
|
type = NSGreaterThanPredicateOperatorType;
|
||||||
|
}
|
||||||
else if ([self scanString: @"==" intoString: NULL]
|
else if ([self scanString: @"==" intoString: NULL]
|
||||||
|| [self scanString: @"=" intoString: NULL])
|
|| [self scanString: @"=" intoString: NULL])
|
||||||
{
|
{
|
||||||
type = NSEqualToPredicateOperatorType;
|
type = NSEqualToPredicateOperatorType;
|
||||||
}
|
}
|
||||||
else if ([self scanString: @"!=" intoString: NULL]
|
|
||||||
|| [self scanString: @"<>" intoString: NULL])
|
|
||||||
{
|
|
||||||
type = NSNotEqualToPredicateOperatorType;
|
|
||||||
}
|
|
||||||
else if ([self scanPredicateKeyword: @"MATCHES"])
|
else if ([self scanPredicateKeyword: @"MATCHES"])
|
||||||
{
|
{
|
||||||
type = NSMatchesPredicateOperatorType;
|
type = NSMatchesPredicateOperatorType;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue