This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author memeplex
Recipients memeplex
Date 2016-06-09.03:17:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1465442258.95.0.0850234987407.issue27274@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-06-09 03:17:39memeplexsetrecipients: + memeplex
2016-06-09 03:17:38memeplexsetmessageid: <1465442258.95.0.0850234987407.issue27274@psf.upfronthosting.co.za>
2016-06-09 03:17:38memeplexlinkissue27274 messages
2016-06-09 03:17:38memeplexcreate