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 Dustin.Oprea
Recipients Dustin.Oprea
Date 2014-04-22.14:02:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1398175349.63.0.548870170471.issue21328@psf.upfronthosting.co.za>
In-reply-to
Content
The memory is resized, but the value returned by len() doesn't change:

>>> b = ctypes.create_string_buffer(23)
>>> len(b)
23
>>> b.raw = '0' * 23
>>> b.raw = '0' * 24
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: string too long

>>> ctypes.resize(b, 28)
>>> len(b)
23
>>> b.raw = '0' * 28
>>> b.raw = '0' * 29
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: string too long
History
Date User Action Args
2014-04-22 14:02:29Dustin.Opreasetrecipients: + Dustin.Oprea
2014-04-22 14:02:29Dustin.Opreasetmessageid: <1398175349.63.0.548870170471.issue21328@psf.upfronthosting.co.za>
2014-04-22 14:02:29Dustin.Oprealinkissue21328 messages
2014-04-22 14:02:29Dustin.Opreacreate