SapphireDensetsu / ypsilon

Automatically exported from code.google.com/p/ypsilon
Other
0 stars 0 forks source link

C functions can't modify int vector as an argument #130

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. write a shared library with a C function: int test(int* a) { *a=1; }
2. write a ffi binding (define test (c-function mylib "mylib" int test
([int])))
3. run this code: (define v (vector 9)) (test v) (display (vector-ref v 0))

What is the expected output? What do you see instead?
"1" is printed in above case ... OR specify [int] is read-only by C
function in FFI API document if specification define it.

What version of the product are you using? On what operating system?
ypsilon r503 (using svn checkout)

Please provide any additional information below.

Original issue reported on code.google.com by kamotak...@gmail.com on 2 Nov 2009 at 1:52