[Ecls-list] floats and uffi
Maurice
mauricex at gmx.net
Tue Sep 13 11:12:16 UTC 2005
Hi,
I have a problem with ecl's uffi. The float value gets corrupted:
--- lib.c
#include <stdio.h>
void test (float x) { fprintf(stderr, "%f\n", x); }
--- test.lisp
(uffi:load-foreign-library "./lib.so")
(uffi:def-function "test"
((a :float))
:returning :void)
(test 12.3)
---
% gcc -shared -fPIC lib.c -o lib.so
ecl> (compile-file "test.lisp" :system-p t)
ecl> (c:build-program "prog" :lisp-files '("test"))
% ./prog
-0.000000
I tried the current CVS version.
Is this my fault or is this a bug?
Thank you.
More information about the ecl-devel
mailing list