From: ·······@ifi.ntnu.no
Subject: ff:def-foreign-call
Date: 
Message-ID: <865d1u$qpn$1@nnrp1.deja.com>
I have a problem with accessing an array returned from a code

The array:
typedef char **ROW;      /* return data as array of strings */

is returned to lisp threw
(ff:def-foreign-call fetch_row nil :returning ?)

How can I access the array in lisp ?
What type and how should I define it ?

I have read the manual for Foreign Function Interface but I cant figure
this out...

Thanks in advance
�yvind


Sent via Deja.com http://www.deja.com/
Before you buy.
From: Reini Urban
Subject: Re: ff:def-foreign-call
Date: 
Message-ID: <388e0658.11309432@judy>
see
http://www.franz.com/support/docs/5.0.1/doc/cl/foreign_functions.htm#6.2
Special Case: Passing an array of strings from Lisp to C

There are different conventions for the array size. either by a limiting
NULL or by an extra size argument. Both are explained.

(ff:def-foreign-call handle_strings 
		     (integer (simple-array simple-string (*))))

·······@ifi.ntnu.no wrote:
>I have a problem with accessing an array returned from a code
>
>The array:
>typedef char **ROW;      /* return data as array of strings */
>
>is returned to lisp threw
>(ff:def-foreign-call fetch_row nil :returning ?)
>
>How can I access the array in lisp ?
>What type and how should I define it ?
>
>I have read the manual for Foreign Function Interface but I cant figure
>this out...

--
Reini Urban
http://xarch.tu-graz.ac.at/autocad/news/faq/autolisp.html