On Tue, May 31, 2011 at 11:01 PM, Markus Schaber
<m.scha...@3s-software.com> wrote:
> Hi, Peter,
>
>> Von: users-boun...@lists.ironpython.com [mailto:users-
> [...]
>>
>>      Does anyone know how to pass the contents of a string to a C
> function
>> without copying it?
>
> A non-pythonic suggestion:
>
> Maybe you could use the .NET System.FileStream to read the data into a
> byte array (or a .NET memory stream), and pass that one to the cFunc?

This is probably your best bet. file() doesn't return bytes until Python 3.

- Jeff
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to