]> granicus.if.org Git - python/commit
bpo-37169: Rewrite _PyObject_IsFreed() unit tests (GH-13888) (GH-13895)
authorVictor Stinner <vstinner@redhat.com>
Fri, 7 Jun 2019 15:41:39 +0000 (17:41 +0200)
committerGitHub <noreply@github.com>
Fri, 7 Jun 2019 15:41:39 +0000 (17:41 +0200)
commit357626676035d2bb12ea92e0edf3c7b383d627ec
tree576271214cbdf8e351d3987233fbeb5af3531d52
parentdd492d9c352eb0fa2bc48ea9acc47e47a7fab8a0
bpo-37169: Rewrite _PyObject_IsFreed() unit tests (GH-13888) (GH-13895)

Replace two Python function calls with a single one to ensure that no
memory allocation is done between the invalid object is created and
when _PyObject_IsFreed() is called.

(cherry picked from commit 3bf0f3ad2046ac674d8e8a2c074a5a8b3327797d)
Lib/test/test_capi.py
Misc/NEWS.d/next/Tests/2019-06-07-12-23-15.bpo-37169.yfXTFg.rst [new file with mode: 0644]
Modules/_testcapimodule.c