[issue5710] ctypes should return composite types from callbacks

Mason Bially report at bugs.python.org
Fri Sep 27 22:51:28 CEST 2013


Mason Bially added the comment:

I agree with Amaury that this is purely a user side concern. While I think it's important to note the behaviour of ctypes in the case that Thomas describes, I believe it's more important to fully support the range of behaviours allowed by C function callbacks.

I see the use cases for complex return types that don't fall under the concerns raised by Thomas as the following:

* Returning a pointer to already existing memory.
* Returning complex value types (structs of ints, doubles, chars, ect). This is especially important from a compatibility standpoint for C libraries which expect such return types.

Because I need this for my current project I will work on writing a patch.

----------
nosy: +Mason.Bially

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5710>
_______________________________________


More information about the Python-bugs-list mailing list