Implement -evaluateWithObject:substitutionVariables: (OS X 10.5 method),

and mark one of the GSBlockPredicate tests as hopeful on OS X.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39506 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Niels Grewe 2016-03-09 15:38:32 +00:00
parent 353810e7a9
commit fcbbe0431f
4 changed files with 34 additions and 5 deletions

View file

@ -360,6 +360,14 @@ extern void GSPropertyListMake(id,NSDictionary*,BOOL,BOOL,unsigned,id*);
return AUTORELEASE([self copy]);
}
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
- (BOOL) evaluateWithObject: (id)object
substitutionVariables: (GS_GENERIC_CLASS(NSDictionary, NSString*, id)*)variables
{
return [[self predicateWithSubstitutionVariables: variables]
evaluateWithObject: object];
}
#endif
- (Class) classForCoder
{
return [NSPredicate class];
@ -378,11 +386,12 @@ extern void GSPropertyListMake(id,NSDictionary*,BOOL,BOOL,unsigned,id*);
return self;
}
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
+ (NSPredicate*)predicateWithBlock: (GSBlockPredicateBlock)block
{
return [[[GSBlockPredicate alloc] initWithBlock: block] autorelease];
}
#endif
@end
@implementation GSTruePredicate