On 2006-07-26 10:04:47 -0400 Jack Johnson <[EMAIL PROTECTED]> wrote:
On 7/25/06, Hubert Chan <[EMAIL PROTECTED]> wrote:
Try changing the 0 on line 162 of Source/NSPredicate.m to NULL:
No luck. Same problem, same spot.
OK, try the attached patch instead. It's longer, but should be the
more correct fix.
By the way, which compiler (and version) are you using?
<NSPredicate.diff>
--
Hubert Chan - email & Jabber: [EMAIL PROTECTED] - http://www.uhoreg.ca/
PGP/GnuPG key: 1024D/124B61FA (Key available at wwwkeys.pgp.net)
Fingerprint: 96C5 012F 5F74 A5F7 1FF7 5291 AF29 C719 124B 61FA
Index: Source/NSPredicate.m
===================================================================
--- Source/NSPredicate.m (revision 23186)
+++ Source/NSPredicate.m (working copy)
@@ -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,27 @@
- (id) initWithString: (NSString*)format
args: (NSArray*)args
+{
+ self = [super initWithString: format];
+ if (self != nil)
+ {
+ _args = [args objectEnumerator];
+ }
+ return self;
+}
+
+- (id) initWithString: (NSString*)format
vargs: (va_list)vargs
{
self = [super initWithString: format];
if (self != nil)
{
- _args = [args objectEnumerator];
- if (_args == nil)
- {
+ _args = nil;
#ifdef __va_copy
- __va_copy(_vargs, vargs);
+ __va_copy(_vargs, vargs);
#else
- _vargs = vargs;
+ _vargs = vargs;
#endif
- }
}
return self;
}
_______________________________________________
Etoile-dev mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-dev