Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Prevent overflows by increasing ring buffer size #47

Merged
merged 2 commits into from
May 29, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions syntex_syntax/src/print/pp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ pub struct PrintStackElem {
const SIZE_INFINITY: isize = 0xffff;

pub fn mk_printer<'a>(out: Box<io::Write+'a>, linewidth: usize) -> Printer<'a> {
// Yes 3, it makes the ring buffers big enough to never
// Yes 55, it makes the ring buffers big enough to never
// fall behind.
let n: usize = 3 * linewidth;
let n: usize = 55 * linewidth;
debug!("mk_printer {}", linewidth);
let token = vec![Token::Eof; n];
let size = vec![0; n];
Expand Down