[Ecls-list] how to convert a string from lisp to a c string (char *)?

yami yamisoe at gmail.com
Thu Mar 25 12:07:17 UTC 2010


hi,
  It works for me. Thank you very much!

On Thu, Mar 25, 2010 at 11:25 AM, Matthew Mondor
<mm_lists at pulsar-zone.net>wrote:

> 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
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Ecls-list mailing list
> Ecls-list at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ecls-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20100325/eccf3c71/attachment.html>


More information about the ecl-devel mailing list