Skip to content

Commit

Permalink
fix for <rdar://problem/7210942> instance variables not visible from …
Browse files Browse the repository at this point in the history
…within iterator in method called through KVO

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@2626 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information
lrz committed Sep 24, 2009
1 parent af742d5 commit 3c0250d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions objc.m
Expand Up @@ -604,9 +604,15 @@ - (VMURange)addressRange;
Class ret_orig;
name += 15;
ret_orig = objc_getClass(name);
if (ret_orig != NULL && RCLASS_VERSION(ret_orig) & RCLASS_IS_OBJECT_SUBCLASS) {
DLOG("XXX", "marking KVO generated klass %p (%s) as RObject", ret, class_getName(ret));
ret_version |= RCLASS_IS_OBJECT_SUBCLASS;
if (ret_orig != NULL) {
const long orig_v = RCLASS_VERSION(ret_orig);
if ((orig_v & RCLASS_IS_OBJECT_SUBCLASS) == RCLASS_IS_OBJECT_SUBCLASS) {
ret_version |= RCLASS_IS_OBJECT_SUBCLASS;
}
if ((orig_v & RCLASS_IS_RUBY_CLASS) == RCLASS_IS_RUBY_CLASS) {
ret_version |= RCLASS_IS_RUBY_CLASS;
}
// XXX merge more flags?
}
}
ret_version |= KVO_CHECK_DONE;
Expand Down

0 comments on commit 3c0250d

Please sign in to comment.