ensure flush contents into the port made in `open-input-bytevector`

This commit is contained in:
Sunrim KIM (keen) 2014-06-29 13:46:46 +09:00
parent 5e12794467
commit 8d9b7e9bf3
1 changed files with 2 additions and 0 deletions

View File

@ -329,6 +329,8 @@ pic_port_open_input_blob(pic_state *pic)
port->status = PIC_PORT_OPEN;
xfwrite(blob->data, 1, blob->len, port->file);
xfflush(port->file);
xrewind(port->file);
return pic_obj_value(port);
}