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 spearsem@gmail.com
Recipients spearsem@gmail.com
Date 2015-11-18.17:57:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1447869436.37.0.609997226839.issue25659@psf.upfronthosting.co.za>
In-reply-to
Content
I'm trying to find a way to create a ctypes array from the underlying memory buffer exposed by an array.array object. The ctypes.Array.from_buffer function isn't documented, but I did find the source code in _ctypes.c around line 497. It's not clear to me where the problem might be.


Code to reproduce it below:

import array, ctypes
a1 = array.array('l')
a1.fromlist(range(10))
ctypes.Array.from_buffer(a1)
#Segfault
History
Date User Action Args
2015-11-18 17:57:16spearsem@gmail.comsetrecipients: + spearsem@gmail.com
2015-11-18 17:57:16spearsem@gmail.comsetmessageid: <1447869436.37.0.609997226839.issue25659@psf.upfronthosting.co.za>
2015-11-18 17:57:16spearsem@gmail.comlinkissue25659 messages
2015-11-18 17:57:16spearsem@gmail.comcreate