new string method in 2.5 (partition)
Gabriel Genellina
gagsl-py at yahoo.com.ar
Fri Sep 22 15:58:20 EDT 2006
At Friday 22/9/2006 04:53, Lawrence D'Oliveiro wrote:
> > ... a python string has both a length *and* a null terminator (for
> > ease of interfacing C routines ...
>
>How does that work for strings with embedded nulls? Or are the C routines
>simply fooled into seeing a truncated part of the string?
This is for simple char* strings, ASCIIZ. If your C code can accept
embedded nulls, surely has made other provisions - like receiving the
buffer length as a parameter. If not, it will see only a truncated string.
Gabriel Genellina
Softlab SRL
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas
More information about the Python-list
mailing list