Permalink
Browse files

remove Leopard-only code

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4937 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
1 parent 8a5b5dc commit da97b834656cfd275c7904a525ce117f4f70f299 @lrz lrz committed Nov 23, 2010
Showing with 0 additions and 20 deletions.
  1. +0 −20 objc.m
View
20 objc.m
@@ -718,22 +718,12 @@
VALUE bstr = rb_str_bstr(str);
NSData *data = [NSData dataWithBytes:rb_bstr_bytes(bstr)
length:rb_bstr_length(bstr)];
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
- NSString *errorString = nil;
- id plist = [NSPropertyListSerialization propertyListFromData:data mutabilityOption:0
- format:NULL errorDescription:&errorString];
-#else
NSError *err = nil;
id plist = [NSPropertyListSerialization propertyListWithData:data options:0
format:NULL error:&err];
-#endif
if (plist == nil) {
rb_raise(rb_eArgError, "error loading property list: '%s'",
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
- [errorString UTF8String]);
-#else
[[err localizedDescription] UTF8String]);
-#endif
}
return OC2RB(plist);
}
@@ -764,22 +754,12 @@
}
id objc_obj = RB2OC(recv);
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
- NSString *errorString = nil;
- NSData *data = [NSPropertyListSerialization dataFromPropertyList:objc_obj
- format:NSPropertyListXMLFormat_v1_0 errorDescription:&errorString];
-#else
NSError *err = nil;
NSData *data = [NSPropertyListSerialization dataWithPropertyList:objc_obj
format:NSPropertyListXMLFormat_v1_0 options:0 error:&err];
-#endif
if (data == nil) {
rb_raise(rb_eArgError, "error serializing property list: '%s'",
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
- [errorString UTF8String]);
-#else
[[err localizedDescription] UTF8String]);
-#endif
}
const uint8_t* bytes = [data bytes];
const size_t len = [data length];

0 comments on commit da97b83

Please sign in to comment.