summaryrefslogtreecommitdiff
path: root/MLKStream.m
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-07-06 17:05:51 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-07-06 17:05:51 +0200
commita4dc2ef855a0513db78ce00338602fbdad9c33da (patch)
tree7b9279c4b6568c8694169cb9f2a24bc42a81845f /MLKStream.m
parent5315f6d376ac9ccbc43d257fa7c4d2cb6400be62 (diff)
Add a workaround for an exception handling problem on Mac OS X.
Diffstat (limited to 'MLKStream.m')
-rw-r--r--MLKStream.m11
1 files changed, 9 insertions, 2 deletions
diff --git a/MLKStream.m b/MLKStream.m
index fa36232..d130520 100644
--- a/MLKStream.m
+++ b/MLKStream.m
@@ -125,19 +125,26 @@
-(BOOL) isEOF
{
+ BOOL eofp = NO;
+
NS_DURING
{
[self peekChar];
}
NS_HANDLER
{
+ // For some reason, NS_VALUERETURN (YES, BOOL) causes warnings of
+ // the following kind on the Apple runtime:
+ //
+ // *** Attempt to remove unrecognized exception handler 0xbfff6200
+ //
if ([[localException name] isEqual:@"MLKStreamError"])
- NS_VALUERETURN (YES, BOOL);
+ eofp = YES;
else
[localException raise];
}
NS_ENDHANDLER;
- return NO;
+ return eofp;
}
@end