Message267951
This real life example is pretty terrible:
(ct.c_float * self._nfeats).from_address(
ct.addressof(self._vals.contents))
The alternative of casting the pointer to pointer-to-array, then pick ptr.contents is not really better.
What about a from_pointer(ptr) method? Or overloading from_address to take a pointer? Or a simple shortcut to get the address pointed to by a pointer (related: https://bugs.python.org/issue26565).
I think this part of ctypes api needs to get more concise and pythonic. |
|
Date |
User |
Action |
Args |
2016-06-09 03:17:39 | memeplex | set | recipients:
+ memeplex |
2016-06-09 03:17:38 | memeplex | set | messageid: <1465442258.95.0.0850234987407.issue27274@psf.upfronthosting.co.za> |
2016-06-09 03:17:38 | memeplex | link | issue27274 messages |
2016-06-09 03:17:38 | memeplex | create | |
|