[macruby-changes] [714] MacRuby/trunk/objc.m
source_changes at macosforge.org
source_changes at macosforge.org
Thu Nov 6 13:59:13 PST 2008
Revision: 714
http://trac.macosforge.org/projects/ruby/changeset/714
Author: lsansonetti at apple.com
Date: 2008-11-06 13:59:13 -0800 (Thu, 06 Nov 2008)
Log Message:
-----------
return non mutable classes for non mutable objects
Modified Paths:
--------------
MacRuby/trunk/objc.m
Modified: MacRuby/trunk/objc.m
===================================================================
--- MacRuby/trunk/objc.m 2008-11-06 21:58:40 UTC (rev 713)
+++ MacRuby/trunk/objc.m 2008-11-06 21:59:13 UTC (rev 714)
@@ -1140,13 +1140,19 @@
}
/* because the CF classes should be hidden */
else if (klass == rb_cCFString) {
- return rb_cNSMutableString;
+ bool __CFStringIsMutable(void *);
+ return __CFStringIsMutable((void *)recv)
+ ? rb_cNSMutableString : rb_cNSString;
}
else if (klass == rb_cCFArray) {
- return rb_cNSMutableArray;
+ bool _CFArrayIsMutable(void *);
+ return _CFArrayIsMutable((void *)recv)
+ ? rb_cNSMutableArray : rb_cNSArray;
}
else if (klass == rb_cCFHash) {
- return rb_cNSMutableHash;
+ bool _CFDictionaryIsMutable(void *);
+ return _CFDictionaryIsMutable((void *)recv)
+ ? rb_cNSMutableHash : rb_cNSHash;
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20081106/7fb459f4/attachment.html>
More information about the macruby-changes
mailing list