valotrading/stirling — pull request #58 by akisaarinen (2012-09-27 11:13:13+00:00)
Title: itch: Add ByteString#getUnsafeBytes

This method can be used to access the internal bytes of a ByteString. It's
called `getUnsafeBytes` because it allows access into the internal state, and
caller must be careful what to do with it. In some cases this is, however,
required.

In case the ByteBuffer is a complete buffer, `getUnsafeBytes` just directly
returns the byte array. In all other cases, it returns a copy of the part the
ByteString is pointing to.

Signed-off-by: Aki Saarinen