On Tue, May 31, 2011 at 11:01 PM, Markus Schaber
<[email protected]> wrote:
> Hi, Peter,
>
>> Von: [email protected] [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
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to