Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

the new clang helpfully picked up this no-no in syck

  • Loading branch information...
commit 2bb0f1286283659bea5452eb9137b27964a24e3e 1 parent bc0289d
@aufflick authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 ext/cocoa/src/SyckInput.m
View
6 ext/cocoa/src/SyckInput.m
@@ -9,6 +9,8 @@ void cocoa_syck_error_handler( SyckParser *p, const char *msg )
NSLog(@"syck error:%s position:(%d, %ld)", msg, p->linect, p->cursor - p->lineptr);
}
+static NSString * const SyckInputMergeConst = @"MERGE";
+
SYMID cocoa_syck_parse_handler(SyckParser *p, SyckNode *n)
{
SYMID oid;
@@ -157,7 +159,7 @@ SYMID cocoa_syck_parse_handler(SyckParser *p, SyckNode *n)
#endif
else if ( strncmp( type_id, "merge", 5 ) == 0 )
{
- v = @"MERGE"; //rely on constants being the same
+ v = SyckInputMergeConst;
}
else
{
@@ -194,7 +196,7 @@ SYMID cocoa_syck_parse_handler(SyckParser *p, SyckNode *n)
oid = syck_map_read( n, map_value, i );
syck_lookup_sym( p, oid, (char **)&o3 );
- if(o2 == @"MERGE")
+ if(o2 == SyckInputMergeConst)
{
if([o3 isKindOfClass:[NSDictionary class]])
[v addEntriesFromDictionary:o3];
Please sign in to comment.
Something went wrong with that request. Please try again.