[svn:parrot] r49037 - trunk/src/pmc
chromatic
chromatic at wgz.org
Thu Sep 16 16:14:08 UTC 2010
On Thursday 16 September 2010 at 01:22, tcurtis wrote:
> Log:
> Use Parrot_str_to_cstring instead of strstart when passing prompt to
> functions that expect C strings in FileHandle.readline_interactive.
> --- trunk/src/pmc/filehandle.pmc Thu Sep 16 08:18:24 2010 (r49036)
> +++ trunk/src/pmc/filehandle.pmc Thu Sep 16 08:22:52 2010 (r49037)
> @@ -383,8 +386,11 @@
> free(r);
> }
> #else
> - if (got_prompt)
> - fprintf(stderr, "%s", prompt->strstart);
> + if (got_prompt) {
> + char *prompt_cstring = Parrot_str_to_cstring(INTERP, prompt);
> + fprintf(stderr, "%s", prompt_cstring);
Parrot_io_eprintf() with a format of "%Ss" should work here without the
conversion to a C string.
-- c
More information about the parrot-dev
mailing list