[MacRuby-devel] [MacRuby] #756: NArray won't build with MacRuby
MacRuby
ruby-noreply at macosforge.org
Mon Jun 21 16:38:28 PDT 2010
#756: NArray won't build with MacRuby
--------------------------------+-------------------------------------------
Reporter: mike@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
--------------------------------+-------------------------------------------
Comment(by martinlagardette@…):
After inspection in the code, the dev is using `RCLASS` to determine
wether or not an object is an instance of `NArray`:
{{{
#!c
static void
na_check_class_narray(VALUE v)
{
if (TYPE(v) != T_CLASS) {
rb_raise(rb_eRuntimeError, "class required");
}
while (v) {
if (v == cNArray || RCLASS(v)->m_tbl == RCLASS(cNArray)->m_tbl)
return;
v = RCLASS_SUPER(v);
}
rb_raise(rb_eRuntimeError, "need NArray or its subclass");
}
}}}
We do not use `m_tbl`, so this cannot be emulated :-(.
I am looking for a solution right now. We do have an equivalent of what is
being done, but it is totally different and would require ugly `#ifdef
MACRUBY` etc. Instead we'd rather find a solution that can be used with
ruby and macruby :-)
--
Ticket URL: <http://www.macruby.org/trac/ticket/756#comment:4>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list