let
buff_contents c =
let
contents =
Buffer
.contents c.buffer
in
(
Buffer
.reset c.buffer; contents)