FFI: JRuby fails processing FFI::Struct fields of type callback
---------------------------------------------------------------

                 Key: JRUBY-3973
                 URL: http://jira.codehaus.org/browse/JRUBY-3973
             Project: JRuby
          Issue Type: Bug
         Environment: jruby 1.4.0dev (ruby 1.8.7p174) (2009-09-16 6586) (Java 
HotSpot(TM) Client VM 1.6.0_10) [i386-java]
            Reporter: Andrea Fazzi
            Assignee: Thomas E Enebo


JRuby fails when processing FFI::Struct fields of type "callback that takes 
callbacks as parameters":

{noformat}

# test_jruby_struct.rb

module MyLib
  extend FFI::Library   
  callback(:MyCallback, [ :pointer ], :void)
  class MyStruct < FFI::Struct
    layout(
      :member, callback([ :MyCallback ], :void)
    )
  end
end

$ jruby test_jruby_struct.rb
/home/andrea/src/jruby/lib/ruby/site_ruby/shared/ffi/types.rb:17:in 
`find_type': Unable to resolve type 'MyCallback' (TypeError)
        from 
/home/andrea/src/jruby/lib/ruby/site_ruby/shared/ffi/struct.rb:149:in 
`find_type'
        from 
/home/andrea/src/jruby/lib/ruby/site_ruby/shared/ffi/library.rb:125:in 
`callback'
        from 
/home/andrea/src/jruby/lib/ruby/site_ruby/shared/ffi/library.rb:125:in `each'
        from 
/home/andrea/src/jruby/lib/ruby/site_ruby/shared/ffi/library.rb:125:in `map'
        from 
/home/andrea/src/jruby/lib/ruby/site_ruby/shared/ffi/library.rb:125:in 
`callback'
        from test_jruby_struct.rb:8

{noformat}


-- 
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