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 pitrou, serhiy.storchaka, vstinner
Date 2013-09-26.12:33:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1380198837.04.0.697765650691.issue19087@psf.upfronthosting.co.za>
In-reply-to
Content
Could you please add unit tests for check that ob_start is used instead of memmove()?

I didn't find a function for that in _testcapi. I tried to test it using sys.getsizeof(), but the size is not reliable (the bytearray buffer is not always shrinked, it depends on the new size).

The best is probably to add a new function in _testcapi to get private attributes: ob_exports, ob_alloc, ob_start, ob_bytes. Using these attributes, it becomes easy to check that fast-path are correctly optimized (eg. increases ob_start instead of getting a new ob_bytes buffer).
History
Date User Action Args
2013-09-26 12:33:57vstinnersetrecipients: + vstinner, pitrou, serhiy.storchaka
2013-09-26 12:33:57vstinnersetmessageid: <1380198837.04.0.697765650691.issue19087@psf.upfronthosting.co.za>
2013-09-26 12:33:57vstinnerlinkissue19087 messages
2013-09-26 12:33:56vstinnercreate