public
Description: The Nu programming language.
Homepage: http://programming.nu
Clone URL: git://github.com/timburks/nu.git
Search Repo:
More fixes for Linux compiler warnings.

There are still a few more. At least one (the NSEnumerator
allObjects warning) is significant.
timburks (author)
Sun Mar 16 21:22:32 -0700 2008
commit  065cc8de0c619710ab56817a747631573db55d9f
tree    76d5168e31cd2a68173a9e6ae1cf508705185fd9
parent  2d2765debb68952aeac01abd82b4f0a81f6f6a0b
...
25
26
27
28
 
29
30
31
...
25
26
27
 
28
29
30
31
0
@@ -25,7 +25,7 @@ int main(int argc, const char *argv[])
0
 #elif defined(LINUX)
0
 int NuMain(int argc, const char *argv[], const char *envp[]);
0
 
0
-int main(int argc, char *argv[], char *envp[])
0
+int main(int argc, const char *argv[], const char *envp[])
0
 {
0
     return NuMain(argc, argv, envp);
0
 }
...
663
664
665
666
 
667
668
669
...
906
907
908
909
910
911
 
 
 
912
913
914
...
937
938
939
940
 
941
942
943
...
663
664
665
 
666
667
668
669
...
906
907
908
 
 
 
909
910
911
912
913
914
...
937
938
939
 
940
941
942
943
0
@@ -663,7 +663,7 @@ id get_nu_value_from_objc_value(void *objc_value, const char *typeString)
0
         case '@':
0
         {
0
             id result = *((id *)objc_value);
0
- return result ? result : [NSNull null];
0
+ return result ? result : (id)[NSNull null];
0
         }
0
         case '#':
0
         {
0
@@ -906,9 +906,9 @@ id nu_calling_objc_method_handler(id target, Method_t m, NSMutableArray *args)
0
     #ifdef DARWIN
0
     //NSLog(@"calling ObjC method %s with target of class %@", sel_getName(method_getName(m)), [target class]);
0
     #else
0
- SEL sel = method_getName(m);
0
- const char *name = sel_get_name(sel);
0
- Class targetClass = [target class];
0
+ //SEL sel = method_getName(m);
0
+ //const char *name = sel_get_name(sel);
0
+ //Class targetClass = [target class];
0
     //NSLog(@"calling ObjC method %s with target of class %@", sel_get_name(method_getName(m)), [target class]);
0
     #endif
0
 
0
@@ -937,7 +937,7 @@ id nu_calling_objc_method_handler(id target, Method_t m, NSMutableArray *args)
0
         // ensure that methods declared to return void always return void.
0
         char return_type_buffer[BUFSIZE];
0
         method_getReturnType(m, return_type_buffer, BUFSIZE);
0
- return (!strcmp(return_type_buffer, "v")) ? [NSNull null] : result;
0
+ return (!strcmp(return_type_buffer, "v")) ? (id)[NSNull null] : result;
0
     }
0
 
0
     // if we get here, we're going through the ObjC runtime to make the call.
...
246
247
248
249
 
250
251
252
...
246
247
248
 
249
250
251
252
0
@@ -246,7 +246,7 @@ extern char *nu_parsedFilename(int i);
0
         [result setCar: [block evalWithArguments:args context:Nu__null]];
0
         [args release];
0
         if ([self cdr] != Nu__null)
0
- [result setCdr: [[self cdr] map: block]];
0
+ [result setCdr: [((NuCell *)[self cdr]) map:block]];
0
     }
0
     return result;
0
 }
...
62
63
64
65
66
67
68
69
70
...
79
80
81
 
 
 
82
83
84
...
62
63
64
 
 
 
65
66
67
...
76
77
78
79
80
81
82
83
84
0
@@ -62,9 +62,6 @@ limitations under the License.
0
 + (NSDictionary *) dictionaryWithList:(id) list;
0
 /*! Look up an object by key, returning the specified default if no object is found. */
0
 - (id) objectForKey:(id)key withDefault:(id)defaultValue;
0
-#ifdef LINUX
0
-- (void) setValue:(id) value forKey:(id) key;
0
-#endif
0
 @end
0
 
0
 /*!
0
@@ -79,6 +76,9 @@ limitations under the License.
0
     If no value is found, looks in the context's parent, continuing
0
     upward until no more parent contexts are found. */
0
 - (id) lookupObjectForKey:(id)key;
0
+#ifdef LINUX
0
+- (void) setValue:(id) value forKey:(id) key;
0
+#endif
0
 @end
0
 
0
 /*!
...
123
124
125
 
 
 
 
 
 
126
127
128
...
219
220
221
 
 
 
 
 
 
 
 
 
 
 
222
223
224
...
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
...
123
124
125
126
127
128
129
130
131
132
133
134
...
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
...
490
491
492
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
493
494
495
0
@@ -123,6 +123,12 @@ extern id Nu__null;
0
     return [parent lookupObjectForKey:key];
0
 }
0
 
0
+#ifdef LINUX
0
+- (void) setValue:(id) value forKey:(id) key
0
+{
0
+ [self setObject:value forKey:key];
0
+}
0
+#endif
0
 @end
0
 
0
 @implementation NSString(Nu)
0
@@ -219,6 +225,17 @@ extern id Nu__null;
0
 #endif
0
 }
0
 
0
+#ifdef LINUX
0
++ (NSString *) stringWithCString:(const char *) cString encoding:(NSStringEncoding) encoding
0
+{
0
+ return [[[NSString alloc] initWithCString:cString] autorelease];
0
+}
0
+
0
+- (const char *) cStringUsingEncoding:(NSStringEncoding) encoding
0
+{
0
+ return [self cString];
0
+}
0
+#endif
0
 @end
0
 
0
 @implementation NSMutableString(Nu)
0
@@ -473,29 +490,6 @@ extern id Nu__null;
0
 
0
 @end
0
 
0
-@implementation NSString (extra)
0
-
0
-+ (NSString *) stringWithCString:(const char *) cString encoding:(NSStringEncoding) encoding
0
-{
0
- return [[[NSString alloc] initWithCString:cString] autorelease];
0
-}
0
-
0
-- (const char *) cStringUsingEncoding:(NSStringEncoding) encoding
0
-{
0
- return [self cString];
0
-}
0
-
0
-@end
0
-
0
-@implementation NSMutableDictionary (extra)
0
-
0
-- (void) setValue:(id) value forKey:(id) key
0
-{
0
- [self setObject:value forKey:key];
0
-}
0
-
0
-@end
0
-
0
 @implementation NSObject (morestuff)
0
 
0
 - (void)willChangeValueForKey:(NSString *)key
...
107
108
109
 
110
 
 
 
111
112
113
...
181
182
183
184
 
185
186
187
...
107
108
109
110
111
112
113
114
115
116
117
...
185
186
187
 
188
189
190
191
0
@@ -107,7 +107,11 @@ extern id Nu__null;
0
             // That's for another day.
0
             // For now, I just substitute each gensym name with its expansion.
0
             //
0
+ #ifdef DARWIN
0
             NSMutableString *tempString = [NSMutableString stringWithString:car];
0
+ #else
0
+ NSString *tempString = [NSString stringWithString:car];
0
+ #endif
0
             //NSLog(@"checking %@", tempString);
0
             NSEnumerator *gensymEnumerator = [gensyms objectEnumerator];
0
             NuSymbol *gensymSymbol;
0
@@ -181,7 +185,7 @@ extern id Nu__null;
0
 
0
     // if the macro contains gensyms, give them a unique prefix
0
     id bodyToEvaluate = ([[self gensyms] count] == 0)
0
- ? body : [self body:body withGensymPrefix:[NSString stringWithFormat:@"g%ld", [NuMath random]] symbolTable:symbolTable];
0
+ ? (id)body : [self body:body withGensymPrefix:[NSString stringWithFormat:@"g%ld", [NuMath random]] symbolTable:symbolTable];
0
 
0
     // uncomment this to get the old (no gensym) behavior.
0
     //bodyToEvaluate = body;
...
17
18
19
 
20
21
22
...
33
34
35
36
 
37
38
39
40
 
 
 
41
42
43
...
67
68
69
70
 
71
72
 
73
74
 
75
76
77
...
17
18
19
20
21
22
23
...
34
35
36
 
37
38
 
 
 
39
40
41
42
43
44
...
68
69
70
 
71
72
 
73
74
 
75
76
77
78
0
@@ -17,6 +17,7 @@ limitations under the License.
0
 */
0
 #import "method.h"
0
 #import "st.h"
0
+#import "extensions.h"
0
 
0
 @implementation NuMethod
0
 
0
@@ -33,11 +34,11 @@ limitations under the License.
0
 
0
 - (NSString *) name
0
 {
0
-#ifdef DARWIN
0
+ #ifdef DARWIN
0
     return m ? [NSString stringWithCString:(sel_getName(method_getName(m))) encoding:NSUTF8StringEncoding] : [NSNull null];
0
-#else
0
- return m ? [NSString stringWithCString:(sel_get_name(method_getName(m))) encoding:NSUTF8StringEncoding] : [NSNull null];
0
-#endif
0
+ #else
0
+ return m ? ((id)[NSString stringWithCString:(sel_get_name(method_getName(m))) encoding:NSUTF8StringEncoding]) : ((id)[NSNull null]);
0
+ #endif
0
 }
0
 
0
 - (int) argumentCount
0
@@ -67,11 +68,11 @@ limitations under the License.
0
         start = &start[step];
0
         len -= step;
0
     }
0
-#ifdef DARWIN
0
+ #ifdef DARWIN
0
     // printf("%s %d %d %s\n", sel_getName(method_getName(m)), i, len, signature);
0
-#else
0
+ #else
0
     // printf("%s %d %d %s\n", sel_get_name(method_getName(m)), i, len, signature);
0
-#endif
0
+ #endif
0
     id result = [NSString stringWithCString:signature encoding:NSUTF8StringEncoding];
0
     free(signature);
0
     return result;
...
82
83
84
85
 
86
87
88
...
193
194
195
196
 
 
 
 
 
197
198
 
199
200
201
...
209
210
211
 
212
213
214
...
216
217
218
219
 
220
221
222
223
 
224
225
226
...
362
363
364
365
 
 
366
367
368
...
82
83
84
 
85
86
87
88
...
193
194
195
 
196
197
198
199
200
201
202
203
204
205
206
...
214
215
216
217
218
219
220
...
222
223
224
 
225
226
227
228
 
229
230
231
232
...
368
369
370
 
371
372
373
374
375
0
@@ -82,7 +82,7 @@ int NuMain(int argc, const char *argv[], const char *envp[])
0
 
0
     #ifdef LINUX
0
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
0
- [NSProcessInfo initializeWithArguments:argv count:argc environment:envp];
0
+ [NSProcessInfo initializeWithArguments:(char **) argv count:argc environment:(char **) envp];
0
     #endif
0
 
0
     void NuInit();
0
@@ -193,9 +193,14 @@ int NuMain(int argc, const char *argv[], const char *envp[])
0
     #ifndef DARWIN
0
     NS_ENDHANDLER
0
         #endif
0
- return 0;
0
+
0
+ #ifdef LINUX
0
+ [pool release];
0
+ #endif
0
+ return 0;
0
 }
0
 
0
+#ifdef DARWIN
0
 static void transplant_nu_methods(Class destination, Class source)
0
 {
0
     if (!nu_copyInstanceMethod(destination, source, @selector(evalWithArguments:context:)))
0
@@ -209,6 +214,7 @@ static void transplant_nu_methods(Class destination, Class source)
0
     if (!nu_copyInstanceMethod(destination, source, @selector(handleUnknownMessage:withContext:)))
0
         NSLog(@"method copy failed");
0
 }
0
+#endif
0
 
0
 void NuInit()
0
 {
0
@@ -216,11 +222,11 @@ void NuInit()
0
     if (!initialized) {
0
         initialized = 1;
0
 
0
-#ifdef DARWIN
0
+ #ifdef DARWIN
0
         // note known placeholder classes
0
         extern void nu_note_placeholders();
0
         nu_note_placeholders();
0
-#endif
0
+ #endif
0
 
0
         // check UTF8 support in PCRE
0
         void *pcre_query_result = 0;
0
@@ -362,7 +368,8 @@ id _nuregex(const char *pattern, int options)
0
                 #endif
0
             {
0
                 #ifndef DARWIN
0
- id exception = localException;
0
+ //unused
0
+ //id exception = localException;
0
                 #endif
0
                 success = NO;
0
             }
...
123
124
125
 
 
 
 
...
123
124
125
126
127
128
129
0
@@ -123,3 +123,7 @@ void nu_markEndOfObjCTypeString(char *type, size_t len);
0
 
0
 // This makes it safe to insert nil into container classes
0
 void nu_swizzleContainerClasses();
0
+
0
+#ifdef LINUX
0
+Method_t class_getClassMethod (MetaClass class, SEL op);
0
+#endif
...
116
117
118
119
 
 
120
121
122
...
116
117
118
 
119
120
121
122
123
0
@@ -116,7 +116,8 @@ int method_get_number_of_arguments (struct objc_method *);
0
 
0
 unsigned int method_getNumberOfArguments(Method_t m)
0
 {
0
- const char *methodTypes = m->method_types;
0
+ //unused
0
+ //const char *methodTypes = m->method_types;
0
     int count = method_get_number_of_arguments(m);
0
     return count;
0
 }
...
601
602
603
604
 
605
606
 
607
608
609
...
615
616
617
618
 
619
620
621
622
623
624
625
 
 
626
627
628
 
 
629
630
631
...
637
638
639
640
 
641
642
 
643
644
645
...
647
648
649
650
 
651
652
653
654
655
656
657
 
 
658
659
660
 
 
661
662
663
...
601
602
603
 
604
605
 
606
607
608
609
...
615
616
617
 
618
619
620
621
622
623
 
 
624
625
626
 
 
627
628
629
630
631
...
637
638
639
 
640
641
 
642
643
644
645
...
647
648
649
 
650
651
652
653
654
655
 
 
656
657
658
 
 
659
660
661
662
663
0
@@ -601,9 +601,9 @@ limitations under the License.
0
 {
0
     Class myClass = [self class];
0
     #ifdef DARWIN
0
- Method method1 = nil, method2 = nil;
0
+ Method method1 = NULL, method2 = NULL;
0
     #else
0
- Method_t method1 = nil, method2 = nil;
0
+ Method_t method1 = NULL, method2 = NULL;
0
     #endif
0
 
0
     // First, look for the methods
0
@@ -615,17 +615,17 @@ limitations under the License.
0
     method2 = class_get_instance_method(myClass, sel2);
0
     #endif
0
     // If both are found, swizzle them
0
- if ((method1 != nil) && (method2 != nil)) {
0
+ if ((method1 != NULL) && (method2 != NULL)) {
0
         method_exchangeImplementations(method1, method2);
0
         return true;
0
     }
0
     else {
0
         #ifdef DARWIN
0
- if (method1 == nil) NSLog(@"swap failed: can't find %s", sel_getName(sel1));
0
- if (method2 == nil) NSLog(@"swap failed: can't find %s", sel_getName(sel2));
0
+ if (method1 == NULL) NSLog(@"swap failed: can't find %s", sel_getName(sel1));
0
+ if (method2 == NULL) NSLog(@"swap failed: can't find %s", sel_getName(sel2));
0
         #else
0
- if (method1 == nil) NSLog(@"swap failed: can't find %s", sel_get_name(sel1));
0
- if (method2 == nil) NSLog(@"swap failed: can't find %s", sel_get_name(sel2));
0
+ if (method1 == NULL) NSLog(@"swap failed: can't find %s", sel_get_name(sel1));
0
+ if (method2 == NULL) NSLog(@"swap failed: can't find %s", sel_get_name(sel2));
0
         #endif
0
         return false;
0
     }
0
@@ -637,9 +637,9 @@ limitations under the License.
0
 {
0
     Class myClass = [self class];
0
     #ifdef DARWIN
0
- Method method1 = nil, method2 = nil;
0
+ Method method1 = NULL, method2 = NULL;
0
     #else
0
- Method_t method1 = nil, method2 = nil;
0
+ Method_t method1 = NULL, method2 = NULL;
0
     #endif
0
 
0
     // First, look for the methods
0
@@ -647,17 +647,17 @@ limitations under the License.
0
     method2 = class_getClassMethod(myClass, sel2);
0
 
0
     // If both are found, swizzle them
0
- if ((method1 != nil) && (method2 != nil)) {
0
+ if ((method1 != NULL) && (method2 != NULL)) {
0
         method_exchangeImplementations(method1, method2);
0
         return true;
0
     }
0
     else {
0
         #ifdef DARWIN
0
- if (method1 == nil) NSLog(@"swap failed: can't find %s", sel_getName(sel1));
0
- if (method2 == nil) NSLog(@"swap failed: can't find %s", sel_getName(sel2));
0
+ if (method1 == NULL) NSLog(@"swap failed: can't find %s", sel_getName(sel1));
0
+ if (method2 == NULL) NSLog(@"swap failed: can't find %s", sel_getName(sel2));
0
         #else
0
- if (method1 == nil) NSLog(@"swap failed: can't find %s", sel_get_name(sel1));
0
- if (method2 == nil) NSLog(@"swap failed: can't find %s", sel_get_name(sel2));
0
+ if (method1 == NULL) NSLog(@"swap failed: can't find %s", sel_get_name(sel1));
0
+ if (method2 == NULL) NSLog(@"swap failed: can't find %s", sel_get_name(sel2));
0
         #endif
0
         return false;
0
     }
...
96
97
98
99
100
 
...
96
97
98
 
99
100
0
@@ -96,4 +96,4 @@ void nu_enableNSLog()
0
     g_enableNSLog = true;
0
 }
0
 #endif
0
-#endif
0
\ No newline at end of file
0
+#endif
...
41
42
43
 
44
45
46
...
148
149
150
151
 
152
153
154
...
161
162
163
164
 
165
166
167
...
41
42
43
44
45
46
47
...
149
150
151
 
152
153
154
155
...
162
163
164
 
165
166
167
168
0
@@ -41,6 +41,7 @@ extern const char *nu_parsedFilename(int i)
0
 }
0
 
0
 #include <readline/readline.h>
0
+#include <readline/history.h>
0
 
0
 @interface NuParser(Internal)
0
 - (int) depth;
0
@@ -148,7 +149,7 @@ id regexWithString(NSString *string)
0
 
0
 - (void) setFilename:(const char *) name
0
 {
0
- if (name == nil)
0
+ if (name == NULL)
0
         filenum = -1;
0
     else {
0
         filenames[filecount] = strdup(name);
0
@@ -161,7 +162,7 @@ id regexWithString(NSString *string)
0
 - (const char *) filename
0
 {
0
     if (filenum == -1)
0
- return nil;
0
+ return NULL;
0
     else
0
         return filenames[filenum];
0
 }
...
17
18
19
 
20
21
22
...
17
18
19
20
21
22
23
0
@@ -17,6 +17,7 @@ limitations under the License.
0
 */
0
 #import "pointer.h"
0
 #import "bridge.h"
0
+#import "extensions.h"
0
 
0
 @implementation NuPointer
0
 
...
51
52
53
 
 
 
 
 
 
 
 
 
54
55
56
...
86
87
88
89
90
91
 
 
 
92
93
94
...
299
300
301
302
 
303
304
305
...
332
333
334
 
...
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
...
95
96
97
 
 
 
98
99
100
101
102
103
...
308
309
310
 
311
312
313
314
...
341
342
343
344
0
@@ -51,6 +51,15 @@ struct objc_method_description_list
0
 }
0
 
0
 - (const char *) name;
0
++ (Protocol *) protocolWithName:(NSString *) name;
0
++ (Protocol *) protocolNamed:(NSString *) name;
0
++ (NSArray *) all;
0
+- (Protocol *) initWithName:(NSString *) name;
0
+- (NSArray *) methodDescriptions;
0
+- (NSComparisonResult) compare:(Protocol *) other;
0
+- (NSArray *) protocols;
0
+- (void) addInstanceMethod:(NSString *)name withSignature:(NSString *)signature;
0
+- (void) addClassMethod:(NSString *)name withSignature:(NSString *)signature;
0
 @end
0
 
0
 // When we create protocols at runtime, we put them here.
0
@@ -86,9 +95,9 @@ static NSMutableDictionary *nuProtocols;
0
 {
0
     [super init];
0
     protocol_name = strdup([name cStringUsingEncoding:NSUTF8StringEncoding]);
0
- protocol_list = nil;
0
- instance_methods = nil;
0
- class_methods = nil;
0
+ protocol_list = NULL;
0
+ instance_methods = NULL;
0
+ class_methods = NULL;
0
 
0
     if (!nuProtocols)
0
         nuProtocols = [[NSMutableDictionary alloc] init];
0
@@ -299,7 +308,7 @@ void nu_initProtocols()
0
     }
0
     #endif
0
 }
0
-
0
+#ifdef DARWIN
0
 // bonus: I found this in the ObjC2.0 runtime.
0
 @interface NuImage : NSObject
0
 {
0
@@ -332,3 +341,4 @@ void nu_initProtocols()
0
 }
0
 
0
 @end
0
+#endif
...
275
276
277
278
 
279
280
281
...
422
423
424
425
 
426
427
428
...
275
276
277
 
278
279
280
281
...
422
423
424
 
425
426
427
428
0
@@ -275,7 +275,7 @@ static NuRegex *backrefPattern;
0
                 }
0
                 // append the captured subpattern to ther replacement string
0
                 captured = [match groupAtIndex:idx];
0
- [repBuffer appendString:captured ? captured : @""];
0
+ [repBuffer appendString:captured ? (id)captured : (id)@""];
0
                 // handle case modifier
0
             }
0
             else if (IS_CASE_MODIFIER(backref)) {
0
@@ -422,7 +422,7 @@ static NuRegex *backrefPattern;
0
 - (NSString *)groupAtIndex:(int)idx
0
 {
0
     NSRange r = [self rangeAtIndex:idx];
0
- return r.location == NSNotFound ? nil : [string substringWithRange:r];
0
+ return r.location == NSNotFound ? (NSString *)nil : [string substringWithRange:r];
0
 }
0
 
0
 - (NSString *)groupNamed:(NSString *)name
...
26
27
28
29
 
30
31
32
...
38
39
40
41
 
42
43
44
45
46
 
47
48
49
50
51
 
52
53
54
...
60
61
62
63
 
64
65
66
...
26
27
28
 
29
30
31
32
...
38
39
40
 
41
42
43
44
45
 
46
47
48
49
50
 
51
52
53
54
...
60
61
62
 
63
64
65
66
0
@@ -26,7 +26,7 @@ limitations under the License.
0
 
0
 - (void)nuSetObject:(id)anObject forKey:(id)aKey
0
 {
0
- [self nuSetObject:((anObject == nil) ? [NSNull null] : anObject) forKey:aKey];
0
+ [self nuSetObject:((anObject == nil) ? (id)[NSNull null] : anObject) forKey:aKey];
0
 }
0
 
0
 @end
0
@@ -38,17 +38,17 @@ limitations under the License.
0
 
0
 - (void)nuAddObject:(id)anObject
0
 {
0
- [self nuAddObject:((anObject == nil) ? [NSNull null] : anObject)];
0
+ [self nuAddObject:((anObject == nil) ? (id)[NSNull null] : anObject)];
0
 }
0
 
0
 - (void)nuInsertObject:(id)anObject atIndex:(int)index
0
 {
0
- [self nuInsertObject:((anObject == nil) ? [NSNull null] : anObject) atIndex:index];
0
+ [self nuInsertObject:((anObject == nil) ? (id)[NSNull null] : anObject) atIndex:index];
0
 }
0
 
0
 - (void)nuReplaceObjectAtIndex:(int)index withObject:(id)anObject
0
 {
0
- [self nuReplaceObjectAtIndex:index withObject:((anObject == nil) ? [NSNull null] : anObject)];
0
+ [self nuReplaceObjectAtIndex:index withObject:((anObject == nil) ? (id)[NSNull null] : anObject)];
0
 }
0
 
0
 @end
0
@@ -60,7 +60,7 @@ limitations under the License.
0
 
0
 - (void)nuAddObject:(id)anObject
0
 {
0
- [self nuAddObject:((anObject == nil) ? [NSNull null] : anObject)];
0
+ [self nuAddObject:((anObject == nil) ? (id)[NSNull null] : anObject)];
0
 }
0
 
0
 @end
...
81
82
83
84
 
85
86
87
...
176
177
178
179
 
180
181
182
...
81
82
83
 
84
85
86
87
...
176
177
178
 
179
180
181
182
0
@@ -81,7 +81,7 @@ static NuSymbolTable *sharedSymbolTable = 0;
0
 - (id) lookup:(const char *) string
0
 {
0
     NuSymbol *symbol;
0
- return st_lookup(symbol_table, (st_data_t)string, (st_data_t *)&symbol) ? symbol : nil;
0
+ return st_lookup(symbol_table, (st_data_t)string, (st_data_t *)&symbol) ? (id)symbol : nil;
0
 }
0
 
0
 // helper function for "all" method
0
@@ -176,7 +176,7 @@ static int add_to_array(st_data_t k, st_data_t v, st_data_t d)
0
         if (!object) return [NSNull null];
0
         id ivarName = [[self stringValue] substringFromIndex:1];
0
         id result = [object valueForIvar:ivarName];
0
- return result ? result : [NSNull null];
0
+ return result ? result : (id) [NSNull null];
0
     }
0
 
0
     // Next, try to find the symbol in the local evaluation context.

Comments

    No one has commented yet.