FFI: put_pointer and put_array_of_pointer fails to send :to_ptr to their 
argument
---------------------------------------------------------------------------------

                 Key: JRUBY-3718
                 URL: http://jira.codehaus.org/browse/JRUBY-3718
             Project: JRuby
          Issue Type: Bug
         Environment: $ jruby --version
jruby 1.3.0RC2 (ruby 1.8.6p287) (2009-05-27 6586) (Java HotSpot(TM) Client VM 
1.6.0_13) [i386-java]

            Reporter: Andrea Fazzi
            Assignee: Thomas E Enebo


JRuby fails with 'Cannot convert argument to pointer (ArgumentError)' on this 
code:

{noformat}
class Foo
  def to_ptr
    FFI::MemoryPointer.new(:int)
  end
end

FFI::MemoryPointer.new(:pointer).put_pointer(0, Foo.new)
FFI::MemoryPointer.new(:pointer, 2).put_array_of_pointer(0, [Foo.new, Foo.new])
{noformat}

It seems it's not calling Foo#to_ptr method.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to