how to create an external string when binding C to Python?

2014-05-08 Thread Simon
I'd like to make a C memory buffer available inside Python via the Python C/API without copying that memory into Python. How to do this? I've read [1] but it's not clear that this functionality exists. In javascript it's possible using String::NewExternal() [2]. Creates a new external string

Re: how to create an external string when binding C to Python?

2014-05-08 Thread Mark Lawrence
On 09/05/2014 00:10, Simon wrote: I'd like to make a C memory buffer available inside Python via the Python C/API without copying that memory into Python. How to do this? I've read [1] but it's not clear that this functionality exists. In javascript it's possible using String::NewExternal()

Re: how to create an external string when binding C to Python?

2014-05-08 Thread Ian Kelly
On Thu, May 8, 2014 at 5:10 PM, Simon simo...@gmail.com wrote: I'd like to make a C memory buffer available inside Python via the Python C/API without copying that memory into Python. How to do this? I've read [1] but it's not clear that this functionality exists. In javascript it's