muller@vague.sarnoff.com (Jim Muller x3283) (01/26/91)
Has anyone had any experience using the Lisp/C interface in Lucid (calling C routines from Lisp)? We were making use of it, but now I've tried to expand that use, and it's not easy given the documentation. Some things I'm having trouble doing: In a C routine, if I access a field in a structure, I have no trouble printing its value, but unless it is the 0th field in the structure, when I return it, the value which appears in Lisp is wrong. If the structure consists of 2 fields and both are floats, no cross-language access seems to work: my lisp accessors can't return correct values from structures allocated in C with malloc; my c accessors can't return correct values from structures created with make-<def-foreign-struct>; and even if I use c accessors on malloced structures, while it can return their correct values, it can't print them out. Thanks in advance for any help. -- Jim