![]() |
|
|
Issue Type:
|
Bug
|
Assignee:
|
Thomas E Enebo
|
Attachments:
|
Rakefile, test.c, test.rb |
Created:
|
02/Sep/12 6:50 PM
|
Description:
|
FFI doesn't seem to want to set member values up properly when passing to attached functions using by_value. When run against MRI versions 1.8.7, 1.9.2 and 1.9.3 using ffi-1.1.5, the attached tests produce identical results when using either the Struct's initialize method as per-usual but produces unpredictable results on JRuby 1.6.7.2. In all MRI versions and in JRuby 1.6.7.2, using Struct#alloc_in produces the correct results.
Attached is a simple C library that implements a simple struct and a test method along with some basic FFI wrapper code to use it. Running rake will try to build the library with gcc and then run the test. The output should show the x and y values of the struct to be 10 and 20 respectively.
|
Environment:
|
OSX 10.8.1, Java 1.6.0_33
|
Project:
|
JRuby
|
Labels:
|
ffi
|
Priority:
|
Major
|
Reporter:
|
J Smith
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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