Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!usc!apple!agate!shelby!unix!grumpy!vague.sarnoff.com From: muller@vague.sarnoff.com (Jim Muller x3283) Newsgroups: comp.lang.lisp Subject: Lisp/C interface in Lucid Message-ID: Date: 25 Jan 91 21:19:23 GMT Sender: usenet@grumpy.sarnoff.com Organization: David Sarnoff Research Center Lines: 19 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-; 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