[Ecls-list] C-STRINGs and lisp strings

Juan Jose Garcia Ripoll lisp at arrakis.es
Tue Jun 28 08:36:19 UTC 2005


Goffioul Michael wrote:

>>2) The user creates a c-string, as mandated by UFFI. Then the routine 
>>ecl_string_safe_pointer() will do nothing because the array 
>>it gets is a 
>>simple one (i.e. no fill pointer). The function "f" gets then 
>>a pointer 
>>to the c-string, it is free to write on the string and the 
>>user will see 
>>those changes.
>>    
>>
>So, any such pattern (C function accepting a char buffer) should be
>enclosed within a WITH-CSTRING (or equivalent) statement?

I understand so. Even users of pure UFFI must do that, because lisp
strings are not expected to be compatible with the C world.

Juanjo






More information about the ecl-devel mailing list