[issue26833] returning ctypes._SimpleCData objects from callbacks

2016-04-25 Thread SilentGhost
Changes by SilentGhost : -- components: +ctypes nosy: +amaury.forgeotdarc, belopolsky, meador.inge ___ Python tracker ___

[issue26833] returning ctypes._SimpleCData objects from callbacks

2016-04-23 Thread Thomas
New submission from Thomas: If a callback function returns a ctypes._SimpleCData object, it will fail with a type error and complain that it expects a basic type. Using the qsort example: def py_cmp_func(a, b): print(a.contents, b.contents) return c_int(0) > TypeError: an integer is