<div dir="ltr">SGTM</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 30, 2014 at 4:00 PM, Lang Hames <span dir="ltr"><<a href="mailto:lhames@gmail.com" target="_blank">lhames@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Guys,<div><br></div><div>The following patch modifies the OwningBuffer class to separate inspection and ownership transfer.</div><div><br></div><div>The getBinary and getBuffer method now return ordinary pointers (with appropriate const-ness). To transfer ownership, you now call takeBinary(), which returns a pair of the Binary and a MemoryBuffer. This interface is odd, but an improvement over transferring the two things separately - this way it is impossible to forget to transfer one of the pair.</div><div><br></div><div>In a future patch I'll look at moving clients of these methods to just holding OwningBinary - that's probably what they want anyway.</div><div><br></div><div>Does this look reasonable?</div><div><br></div><div>Cheers,</div><div>Lang.</div><div><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div>