[macruby-changes] [5125] MacRuby/trunk/objc.m
source_changes at macosforge.org
source_changes at macosforge.org
Thu Jan 6 18:02:51 PST 2011
Revision: 5125
http://trac.macosforge.org/projects/ruby/changeset/5125
Author: lsansonetti at apple.com
Date: 2011-01-06 18:02:46 -0800 (Thu, 06 Jan 2011)
Log Message:
-----------
fix a bug when sending kvo notifications on immediate objects would cause a crash
Modified Paths:
--------------
MacRuby/trunk/objc.m
Modified: MacRuby/trunk/objc.m
===================================================================
--- MacRuby/trunk/objc.m 2011-01-07 00:22:34 UTC (rev 5124)
+++ MacRuby/trunk/objc.m 2011-01-07 02:02:46 UTC (rev 5125)
@@ -668,15 +668,19 @@
}
void
-rb_objc_willChangeValueForKey(id obj, NSString *key)
+rb_objc_willChangeValueForKey(VALUE obj, NSString *key)
{
- [obj willChangeValueForKey:key];
+ if (!SPECIAL_CONST_P(obj)) {
+ [(id)obj willChangeValueForKey:key];
+ }
}
void
-rb_objc_didChangeValueForKey(id obj, NSString *key)
+rb_objc_didChangeValueForKey(VALUE obj, NSString *key)
{
- [obj didChangeValueForKey:key];
+ if (!SPECIAL_CONST_P(obj)) {
+ [(id)obj didChangeValueForKey:key];
+ }
}
static VALUE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20110106/89ee0383/attachment.html>
More information about the macruby-changes
mailing list