Fix for bad cast

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23209 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2006-08-06 05:18:41 +00:00
parent 540989b765
commit 3c803fe41a
2 changed files with 20 additions and 10 deletions

View file

@ -1,3 +1,8 @@
2006-08-06 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSPredicate.m: Reorganize initialisation of scanner to avoid
implicit cast of zero to a va_listt (fix bug #17336)
2006-08-04 23:26-EDT Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSKeyedArchiver.m: in _encodeObject:forKey: use replacement

View file

@ -52,7 +52,8 @@
}
- (id) initWithString: (NSString*)format
args: (NSArray*)args
args: (NSArray*)args;
- (id) initWithString: (NSString*)format
vargs: (va_list)vargs;
- (id) nextArg;
- (BOOL) scanPredicateKeyword: (NSString *) key;
@ -158,8 +159,7 @@
NSPredicate *p;
s = [[GSPredicateScanner alloc] initWithString: format
args: args
vargs: 0];
args: args];
p = [s parse];
RELEASE(s);
return p;
@ -172,7 +172,6 @@
NSPredicate *p;
s = [[GSPredicateScanner alloc] initWithString: format
args: nil
vargs: args];
p = [s parse];
RELEASE(s);
@ -1274,20 +1273,26 @@
- (id) initWithString: (NSString*)format
args: (NSArray*)args
vargs: (va_list)vargs
{
self = [super initWithString: format];
if (self != nil)
{
_args = [args objectEnumerator];
if (_args == nil)
{
}
return self;
}
- (id) initWithString: (NSString*)format
vargs: (va_list)vargs
{
self = [super initWithString: format];
if (self != nil)
{
#ifdef __va_copy
__va_copy(_vargs, vargs);
__va_copy(_vargs, vargs);
#else
_vargs = vargs;
_vargs = vargs;
#endif
}
}
return self;
}