[macruby-changes] [4896] MacRuby/trunk/bridgesupport.cpp
source_changes at macosforge.org
source_changes at macosforge.org
Mon Nov 8 14:03:41 PST 2010
Revision: 4896
http://trac.macosforge.org/projects/ruby/changeset/4896
Author: lsansonetti at apple.com
Date: 2010-11-08 14:03:32 -0800 (Mon, 08 Nov 2010)
Log Message:
-----------
make sure to not emit a warning when poking for the __octype__ hidden boxed ivar + better exception message when attempting to pass an unrecognized FFI symbol type to Pointer.new
Modified Paths:
--------------
MacRuby/trunk/bridgesupport.cpp
Modified: MacRuby/trunk/bridgesupport.cpp
===================================================================
--- MacRuby/trunk/bridgesupport.cpp 2010-11-08 06:17:50 UTC (rev 4895)
+++ MacRuby/trunk/bridgesupport.cpp 2010-11-08 22:03:32 UTC (rev 4896)
@@ -212,7 +212,7 @@
static rb_vm_bs_boxed_t *
locate_bs_boxed(VALUE klass, const bool struct_only=false)
{
- VALUE type = rb_ivar_get(klass, boxed_ivar_type);
+ VALUE type = rb_attr_get(klass, boxed_ivar_type);
assert(type != Qnil);
rb_vm_bs_boxed_t *bs_boxed = GET_CORE()->find_bs_boxed(RSTRING_PTR(type));
assert(bs_boxed != NULL);
@@ -1349,7 +1349,7 @@
ffi_type_shortcuts.find(SYM2ID(type));
if (iter == ffi_type_shortcuts.end()) {
- rb_raise(rb_eTypeError, "unrecognized string `%s' given as FFI type",
+ rb_raise(rb_eTypeError, "unrecognized symbol :%s given as FFI type",
rb_id2name(SYM2ID(type)));
}
@@ -1463,7 +1463,7 @@
static VALUE
rb_boxed_objc_type(VALUE rcv, SEL sel)
{
- return rb_ivar_get(rcv, boxed_ivar_type);
+ return rb_attr_get(rcv, boxed_ivar_type);
}
static VALUE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101108/bb4579a4/attachment.html>
More information about the macruby-changes
mailing list