Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/io/api.c b/src/io/api.c
- index 2778c56..5fd825a 100644
- --- a/src/io/api.c
- +++ b/src/io/api.c
- @@ -905,7 +905,13 @@ STRING *
- Parrot_io_readline(PARROT_INTERP, ARGMOD(PMC *handle))
- {
- ASSERT_ARGS(Parrot_io_readline)
- - return Parrot_io_readline_s(interp, handle, STRINGNULL);
- +
- + PMC * const attr_value = VTABLE_get_attr_str(interp,
- + handle, Parrot_str_new_constant(interp, "record_separator"));
- + STRING * const terminator = (PMC_IS_NULL(attr_value) ? CONST_STRING(interp, "\n")
- + : VTABLE_get_string(interp, attr_value));
- +
- + return Parrot_io_readline_s(interp, handle, terminator);
- }
- PARROT_EXPORT
Advertisement
Add Comment
Please, Sign In to add comment