[MacRuby-devel] [MacRuby] #178: ArgumentError Exception: can't convert C/Objective-C value of type `[4d]' to Ruby object

MacRuby ruby-noreply at macosforge.org
Sat Dec 13 12:56:11 PST 2008


#178: ArgumentError Exception: can't convert C/Objective-C value of type `[4d]'
to Ruby object
---------------------------------+------------------------------------------
 Reporter:  dognotdog@…          |       Owner:  lsansonetti@…              
     Type:  defect               |      Status:  new                        
 Priority:  major                |   Milestone:                             
Component:  MacRuby              |    Keywords:  ArgumentError array convert
---------------------------------+------------------------------------------
 Trying to use a function with the following .bridgesupport entry:

 {{{
 <function name='vCreate'>
 <arg type='d'/>
 <arg type='d'/>
 <arg type='d'/>
 <arg type='d'/>
 <retval type='{_vt=[4d]}'/>
 </function>
 }}}

 Function prototype:

 {{{
 typedef double vmfloat_t;
 typedef struct _vt
 {
     vmfloat_t farr[4];
 } vector_t;
 vector_t vCreate(vmfloat_t a, vmfloat_t b, vmfloat_t c, vmfloat_t d);
 }}}

 An ArgumentError exception is raised on the return type. It's simply a
 struct containing a simple array, so automatic boxing/unboxing should
 work. Possible fix through additions to the bridgesupport entry?

 trunk/ r766

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/178>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list