[Ecls-list] Latest changes

Goffioul Michael goffioul at imec.be
Tue Jun 28 04:47:25 UTC 2005


> Daniel Crettol wrote:
> 
> >I just checked the CVS repository and I found that the fix I 
> submitted
> >the 06/10/05 has not been applied.
> >Is there any reason ?
> >
> Sorry, my e-mail program (mozilla), marked it as spam and 
> ended in the 
> Junk folder. I had a look at it, though, and it is not so simple.
> 
> Just to remaind what the problem is, you pass strings with 
> fill pointers 
> to the C world. It is the extra junk after the fill pointer 
> which causes 
> your problem, because the C code will see this junk. The FFI 
> interface 
> hence cannot simply get a pointer to the data in the string, 
> but should 
> create a new copy. However both cases have problems: if we do 
> not make a 
> copy, the C code gets junk, if we make a copy, the string 
> that is passed 
> to the C world is not the same one and we cannot use this 
> string to get 
> data from the C world.
> 
> I am still thinking about the right solution.

Why not set the last char of the string to '\0' if it's long enough.
Otherwise, extend it by 1 for the null byte, but keep the LISP string
length unchanged?
Maybe I overlooked something.

Michael.


More information about the ecl-devel mailing list