Han-Wen Nienhuys wrote:
Hi, what's the proper way to use read-string!/partial ? If I read a file with fewer bytes than the arg of read-string!/partial, I get problems down the line, when char * scm_to_locale_stringn (SCM str, size_t *lenp) checks whether memcpy (res, scm_i_string_chars (str), len); if (lenp == NULL) { res[len] = '\0'; if (strlen (res) != len) { free (res); scm_misc_error (NULL, "string contains #\\nul character: ~S", scm_list_1 (str)); } } In addition, I this error message isn't printed properly, but I get Converting to PNG...throw from within critical section. Geannuleerd muurbloem:~/src/lilypond$
additional information: this comes from regex-posix.c c_str = scm_to_locale_string (substr); status = regexec (SCM_RGX (rx), c_str, nmatches, matches, scm_to_int (flags)); free (c_str); why is this using null-delimited strings? -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel