Converts a Lisp string to a foreign string within the scope of the body of a
with-dynamic-foreign-objects
macro.
convert-to-dynamic-foreign-string string &key external-format null-terminated-p allow-null => pointer , length , byte-count
A Lisp string.
An external format specification.
If
t
, the foreign string terminates with a null character. The default value
is
t
.
A boolean. The default is
nil
.
A FLI pointer to the foreign string.
The length of the string (including the terminating null character if there is one).
The number of bytes in the converted string.
The function
convert-to-dynamic-foreign-string
converts a Lisp string to a foreign string, and returns a pointer to the string and the length of the string. The memory allocation for the string and pointer is within the scope of the body of a with-dynamic-foreign-objects command.
The external-format argument is interpreted as by with-foreign-string.
The
null-terminated-p
keyword specifies whether the foreign string is terminated with a null character. It defaults to
t
.
If
allow-null
is non-nil, then if
string
is
nil
a null pointer
pointer
is returned.
allocate-dynamic-foreign-object
convert-from-foreign-string
convert-to-foreign-string
set-locale
set-locale-encodings
with-dynamic-foreign-objects
with-foreign-string
Calling a C function that takes an array of strings
LispWorks Foreign Language Interface User Guide and Reference Manual - 7 Dec 2011