Add IOBufQueue::prepend, fix bug in IOBuf::prepend.
authorTudor Bosman <tudorb@fb.com>
Sat, 7 Jul 2012 00:12:07 +0000 (17:12 -0700)
committerTudor Bosman <tudorb@fb.com>
Fri, 13 Jul 2012 23:28:23 +0000 (16:28 -0700)
commit53d4209fdaa204747f5bb894b616d9770cb767a9
tree28df1ef80901dba1fbf67c1ddf6e194a7b4e725d
parentb384b6bc5ca309c6dfb814ddfd62da745f667806
Add IOBufQueue::prepend, fix bug in IOBuf::prepend.

Summary:
IOBuf::prepend needs to increment length_.

Added IOBufQueue::prepend, which uses the headroom in the first buffer
instead of growing the queue at the head.

Test Plan: tests added

Reviewed By: simpkins@fb.com

FB internal diff: D513676
folly/experimental/io/IOBuf.h
folly/experimental/io/IOBufQueue.cpp
folly/experimental/io/IOBufQueue.h
folly/experimental/io/test/IOBufQueueTest.cpp
folly/experimental/io/test/IOBufTest.cpp