dgelessus <dgelessus+bugs.python....@me.com> added the comment:
Thank you for looking into this! I can confirm that Eryk Sun's change fixes the issue for me locally. I'm up for making the patch for this. Regarding tests, I see there are already some refcount-related ctypes tests in Lib/ctypes/test/test_refcounts.py - should I add another test case there that reproduces this situation and ensures that None's refcount is unaffected? (I imagine testing against None's refcount will be a bit fragile, so it might be best to call the previously-buggy function in a loop and check afterwards that None's refcount hasn't changed significantly.) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36880> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com