[Ecls-list] [spam?] Fwd: How used c string args and c string result?
Goffioul Michael
goffioul at imec.be
Wed May 2 08:00:43 UTC 2007
> -----Original Message-----
> From: ecls-list-bounces at lists.sourceforge.net
> [mailto:ecls-list-bounces at lists.sourceforge.net] On Behalf Of
> birulevo.net
> Sent: Monday 30 April 2007 20:04
> To: ecls-list at lists.sourceforge.net
> Subject: [spam?] [Ecls-list] Fwd: How used c string args and
> c string result?
> Importance: Low
>
> Hello, ecls-list.
> I'am need used foreign c-string. Please talk me!..
>
> My part c file compiling in *.obj separate ECL:
>
> ...
> char* save_file(char* dir)
> {
> ...
>
> In lisp-file:
>
> (ffi::Clines
> "#include \"save_upload_file.h\""
> )
>
> (defun save_file() (ffi::c-inline (s) (:char*) :char*
> "save_file(#0)" :one-liner t))
>
> Error when compiling:
>
> ;;; Error: Unable to coerce lisp object from type (STRING,:CHAR*)
> to C/C++ type (T,:OBJECT)
>
> When error? using MAKE-ARRAY? Conversion result? How?
Use :cstring instead of :char*.
Michael.
More information about the ecl-devel
mailing list