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 vstinner
Recipients Rafal.Dowgird, vstinner
Date 2011-08-17.13:16:23
SpamBayes Score 0.00072574004
Marked as misclassified No
Message-id <1313586983.83.0.116425424219.issue12769@psf.upfronthosting.co.za>
In-reply-to
Content
I don't think that it's a bug, but a feature.

Example:

buffer=ctypes.create_string_buffer(4)
buffer.value='a\0bc'
print("buffer.value=%r" % buffer.value)
print("buffer.raw=%r" % buffer.raw)

displays

buffer.value='a'
buffer.raw='a\x00bc'

Sorry, I don't know how to get the raw value of a c_char array in a structure. You should maybe use another type.
History
Date User Action Args
2011-08-17 13:16:23vstinnersetrecipients: + vstinner, Rafal.Dowgird
2011-08-17 13:16:23vstinnersetmessageid: <1313586983.83.0.116425424219.issue12769@psf.upfronthosting.co.za>
2011-08-17 13:16:23vstinnerlinkissue12769 messages
2011-08-17 13:16:23vstinnercreate