[EMAIL PROTECTED] (Ludovic Courtès) writes:

> Marius Vollmer <[EMAIL PROTECTED]> writes:
>
>> Here is a patch for what I have in mind.  I have applied it already.
>
> Just a note: it seems that the line
>
>> +                  data = scm_i_string_chars (exp);
>
> appears twice within the loop but is not needed.

This is actually needed with the new string representation.  See
strings.h:

   Internal, low level interface to the character arrays

   - Use scm_i_string_chars to get a pointer to the byte array of a
     string for reading.  Use scm_i_string_length to get the number of
     bytes in that array.  The array is not null-terminated.

   - The array is valid as long as the corresponding SCM object is
     protected but only until the next SCM_TICK.  During such a 'safe
     point', strings might change their representation.

The call to scm_lfwrite might do anything since the port might be a
softport, for example.  Thus, we need to call scm_i_string_chars again
after each such call.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user

Reply via email to