Surendra Singhi wrote:

> The wxwidgets doc says "The ASCII NULL character is allowed, but be aware that
> in the current string implementation some methods might not work correctly in
> this case." So, indeed strcpy may not work. 
> So, should I change it to `memcpy'?  
> 
> int size=(1+result.Length())*sizeof(char)
> char *buf = (char*)malloc(size);
> if (buf) memcpy(_buf, result.c_str(), size);

I think this doesn't help, because the Lisp side doesn't know how long the
buffer is. Perhaps you need an additional parameter, an pointer to an
integer, which is provided from the Lisp program and filled from the Lisp,
or a Lisp function which has 2 functions, a char pointer and a length and
which is called from C for creating a Lisp string.

-- 
Frank Buß, [EMAIL PROTECTED]
http://www.frank-buss.de, http://www.it4-systems.de

_______________________________________________
Gardeners mailing list
[email protected]
http://www.lispniks.com/mailman/listinfo/gardeners

Reply via email to