On 10/16/07, <b class="gmail_sendername">Thomas Hauk</b> <<a href="mailto:thauk@novuscom.net">thauk@novuscom.net</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Oct 16, 2007, at 3:31 AM, Roman Yakovenko wrote:<br>> Next code was generated by Py++, may be it is not optimal but it<br>> does the work. __array_1.pypp.hpp file is attached<br><br>Thanks for the code, Roman.<br>
<br>I must say how surprised I am at the amount of code it takes to wrap<br>a struct containing only an array of chars! Is this a limitation of<br>the way C++ and Python get bound,</blockquote><div><br>I warned you about code size. First of all this is how Py++ generates the code in this case. Second if you will use indexing suite V2, than the amount of code will drop.
<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> or is this because of some<br>inefficiency in Boost.Python? </blockquote><div>
<br>I didn't tested the code for efficiency, but it doesn't copy the array, just provides access to the items. So I don't expect problems with it. <br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
If the latter, I would hope that this<br>becomes a new base case for improving the package.<br><br>Would it be easier to wrap this using another technology, like SWIG?<br></blockquote></div><br>Don't know never used it.
<br><br clear="all"><br>-- <br>Roman Yakovenko<br>C++ Python language binding<br><a href="http://www.language-binding.net/">http://www.language-binding.net/</a>