[pypy-dev] ctypes create_string_buffer

Armin Rigo arigo at tunes.org
Tue Jan 14 08:12:13 CET 2014


Hi HY,

On Mon, Jan 13, 2014 at 2:55 AM, HY <lightdarkadmin at 163.com> wrote:
> thanks you reply my message.
> I think the string is pure struct, mybe should special process;
> want a little of change as soon as possible enablement.
>
> I have a little think of a way,
> whether add shareptr class in ctypes or cffi?
> this at denseness data exchange, it can large cut down memory copy.

Sorry, I don't understand you...

What I said in more details: "lib_pypy/_ctypes/array.py" line 20,
setvalue(): this can be done more efficiently.  We can change it.  It
would improve the speed a lot.  It is not complicated, but it needs a
new function in the _rawffi module: "_rawffi.string2charp()".


A bientôt,

Armin.


More information about the pypy-dev mailing list