title: How to expose raw byte buffers with Boost::Python?
body: <p>I've got third party C++ library in which some class methods use raw byte buffers. I'm not quite sure how to deal in Boost::Python with it.</p>
  
  <p>C++ library header is something like:
  </p>
  
  <pre class="lang-cpp prettyprint-override"><code>class CSomeClass
  {
    public:
        int load( unsigned char *&amp; pInBufferData, int &amp; iInBufferSize );
        int save( unsigned char *&amp; pOutBufferData, int &amp; iOutBufferSize );
  }
  </code></pre>
  
  <p>In stuck with the Boost::Python code...</p>
  
  <pre class="lang-cpp prettyprint-override"><code>class_&lt;CSomeClass&gt;("CSomeClass", init&lt;&gt;())
      .def("load", &amp;CSomeClass::load, (args(/* what do I put here??? */)))
      .def("save", &amp;CSomeClass::save, (args(/* what do I put here??? */)))
  </code></pre>
  
  <p>How do I wrap these raw buffers to expose them as raw strings in Python?</p>