[macruby-changes] [4937] MacRuby/trunk/objc.m

source_changes at macosforge.org source_changes at macosforge.org
Mon Nov 22 19:26:32 PST 2010


Revision: 4937
          http://trac.macosforge.org/projects/ruby/changeset/4937
Author:   lsansonetti at apple.com
Date:     2010-11-22 19:26:28 -0800 (Mon, 22 Nov 2010)
Log Message:
-----------
remove Leopard-only code

Modified Paths:
--------------
    MacRuby/trunk/objc.m

Modified: MacRuby/trunk/objc.m
===================================================================
--- MacRuby/trunk/objc.m	2010-11-23 02:25:55 UTC (rev 4936)
+++ MacRuby/trunk/objc.m	2010-11-23 03:26:28 UTC (rev 4937)
@@ -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];
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101122/94ed72de/attachment.html>


More information about the macruby-changes mailing list