[pypy-issue] [issue1233] str() types can't be used with ctypes's py_object()

Marcus von Appen tracker at bugs.pypy.org
Mon Sep 3 18:48:19 CEST 2012


Marcus von Appen <mva at sysfault.org> added the comment:

I know that using a separate hook would be possible (as well as using an
object class wrapper for the callback). As written earlier, it would be
somewhat more comfortable, though, if one could just pass the payload
directly to the C code hook.

This also would allow 3rd party C code APIs to pick up the data and do
further processing with it without the need to create a separate wrapper,
which needs to be unpacked elsewhere beforehand.

For pure Python interaction, the callback wrapper is an easy solution,
for a more generic approach in PyPy, one currently would need to put
the argument into another capsule to pass it around, which makes code
supposed to be run in a CPython or PyPy environment more complex.

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1233>
________________________________________


More information about the pypy-issue mailing list