[macruby-changes] [3476] MacRuby/trunk/objc.m
source_changes at macosforge.org
source_changes at macosforge.org
Wed Feb 10 14:52:11 PST 2010
Revision: 3476
http://trac.macosforge.org/projects/ruby/changeset/3476
Author: lsansonetti at apple.com
Date: 2010-02-10 14:52:08 -0800 (Wed, 10 Feb 2010)
Log Message:
-----------
auto-tag NSString subclasses as such
Modified Paths:
--------------
MacRuby/trunk/objc.m
Modified: MacRuby/trunk/objc.m
===================================================================
--- MacRuby/trunk/objc.m 2010-02-10 09:21:54 UTC (rev 3475)
+++ MacRuby/trunk/objc.m 2010-02-10 22:52:08 UTC (rev 3476)
@@ -261,7 +261,8 @@
if (!RCLASS_RUBY(k)) {
long v = RCLASS_VERSION(k);
if (!(v & RCLASS_IS_HASH_SUBCLASS)
- && !(v & RCLASS_IS_ARRAY_SUBCLASS)) {
+ && !(v & RCLASS_IS_ARRAY_SUBCLASS)
+ && !(v & RCLASS_IS_STRING_SUBCLASS)) {
Class k2 = k;
while (k2 != NULL) {
if (k2 == (Class)rb_cNSHash) {
@@ -274,6 +275,11 @@
RCLASS_SET_VERSION(k, v);
break;
}
+ else if (k2 == (Class)rb_cNSString) {
+ v |= RCLASS_IS_STRING_SUBCLASS;
+ RCLASS_SET_VERSION(k, v);
+ break;
+ }
k2 = class_getSuperclass(k2);
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100210/15acc9fe/attachment.html>
More information about the macruby-changes
mailing list