[Ecls-list] how to convert a string from lisp to a c string (char *)?
Matthew Mondor
mm_lists at pulsar-zone.net
Thu Mar 25 03:25:42 UTC 2010
On Thu, 25 Mar 2010 07:27:46 +0800
yami <yamisoe at gmail.com> wrote:
> Hi,
>
> How can I convert a string from lisp to a c string, so that I can use it in
> C?
> It seems a FAQ question, but I can not find the answer...
What I've been using so far here is the method used by the FFI for :CSTRING
char *
cl_string_to_cstring(cl_object str)
{
return ecl_base_string_pointer_safe(
si_copy_to_simple_base_string(str));
}
--
Matt
More information about the ecl-devel
mailing list