[macruby-changes] [299] MacRuby/trunk/objc.m
source_changes at macosforge.org
source_changes at macosforge.org
Sat Jun 21 00:32:07 PDT 2008
Revision: 299
http://trac.macosforge.org/projects/ruby/changeset/299
Author: lsansonetti at apple.com
Date: 2008-06-21 00:32:07 -0700 (Sat, 21 Jun 2008)
Log Message:
-----------
potential fix for rich's strange bug
Modified Paths:
--------------
MacRuby/trunk/objc.m
Modified: MacRuby/trunk/objc.m
===================================================================
--- MacRuby/trunk/objc.m 2008-06-19 19:55:35 UTC (rev 298)
+++ MacRuby/trunk/objc.m 2008-06-21 07:32:07 UTC (rev 299)
@@ -1063,6 +1063,7 @@
Method method;
ffi_cif *cif;
IMP imp;
+ Class klass;
};
static VALUE
@@ -1096,6 +1097,7 @@
ctx->method = class_getInstanceMethod(klass, ctx->selector);
ctx->cif = NULL;
ctx->imp = NULL;
+ ctx->klass = NULL;
assert(ctx->method != NULL);
GC_WB(&rb_current_cfunc_node->u3.value, ctx);
}
@@ -1163,7 +1165,7 @@
imp = method_getImplementation(smethod);
}
else {
- if (ctx->imp != NULL) {
+ if (ctx->imp != NULL && ctx->klass == klass) {
imp = ctx->imp;
}
else {
@@ -1171,6 +1173,7 @@
class_getInstanceMethod(klass, ctx->selector)
? method_getImplementation(ctx->method)
: objc_msgSend; /* alea jacta est */
+ ctx->klass = klass;
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080621/72f78de5/attachment.htm
More information about the macruby-changes
mailing list